Saiedmomen
12/06/2018, 8:43 PMAmir Hossein
12/07/2018, 9:44 AMdvlwj
12/07/2018, 10:56 AMAndroid75
12/07/2018, 10:57 AMdata class (var name:String, surname:String)
how can i know prop name and value ? I don't want use reflection and "java" FieldsSaiedmomen
12/07/2018, 7:01 PMCasey Kulm
12/07/2018, 8:26 PMtevjef
12/08/2018, 9:57 PMclass SomeActivity @Inject constructor() {
@Inject
lateinit var notUsed: UnusedClass
}
Over the years, classes have built up with unused @Inject
properties . It’s hard to clean this up manually over an entire codebase.DJ2
12/08/2018, 11:08 PMfindViewById
is no longer necessary,
val btnSaveClick= findViewById<Button>(R.id.btnSave)
btnSaveClick?.setOnClickListener {
Toast.makeText(this@ArticleAdapter, "Article saved.", Toast.LENGTH_LONG).show()
}
What should be used instead.
I have this in my activity.xml:
<Button
android:id="@+id/btnSave"
android:layout_width="70dp"
android:layout_height="40dp"
android:onClick="btnSave"
android:text="@string/save"
android:textAlignment="center" />
Javier
12/08/2018, 11:27 PMdewildte
12/09/2018, 1:52 AMmingkangpan
12/09/2018, 1:58 AMghedeon
12/09/2018, 8:35 AMghedeon
12/09/2018, 8:36 AMDJ2
12/10/2018, 1:20 AMsetOnClickListener
within an adapter class I have, can’t seem to figure out whyDJ2
12/10/2018, 8:48 PMval formatter = SimpleDateFormat("yyyy-MM-dd HH:mm:ssZ", Locale.getDefault())
formatter.timeZone = TimeZone.getTimeZone("UTC")
val result = formatter.parse(dateTv.text)
Would this work?jurajsolarml
12/11/2018, 7:35 AMSergio Casero
12/11/2018, 10:15 AMgrep -rnw '.' -e 'android.support'
It returns each ocurrency, with the file and the line
./layout/activity_new_incident.xml:33: <android.support.design.widget.FloatingActionButton
(edited)
I don't know if we can improve the command, moving into a script (in order to add it to CI or whatever) If anyone have any suggestions, feel free to post any updates -> https://gist.github.com/sergiocasero/fab62dfbeb303b49c1991b909cb3cf19
PD: I know this is an easy command, it just for sharing 🙂sanogueralorenzo
12/11/2018, 3:04 PMdangvh
12/11/2018, 7:28 PMgsala
12/12/2018, 10:31 AM@Json(name = "xx")
, the serialized string has the name of the enum member itself instead of the value passed into the annotation. Has anyone run into this problem before?Saiedmomen
12/12/2018, 11:48 AMonViewCreated
with an empty apply
the binding works properly. Here is a question I asked on stackoverflow when I first encountered the issue https://stackoverflow.com/questions/48971322/kotlin-android-extension-fragment-view-null
Has anyone else experieced this issue?Saiedmomen
12/12/2018, 11:57 AMtevjef
12/12/2018, 5:17 PMval a: String? = b as String?
and val a: String? = b as? String
Jakub
12/13/2018, 9:38 AMbodo
12/13/2018, 10:30 AMCorentin Leffy
12/13/2018, 11:13 AMparams
).
But how can I avoid it ?
Thank you !Paul Woitaschek
12/13/2018, 4:46 PMIcaro Temponi
12/13/2018, 7:13 PMlawlorslaw
12/14/2018, 8:55 AMList<Tide>
where a Tide
has a field tide
that is of type Float
, what is the best way to sort by the tide
field?
I tried tides.sortedBy { it.tide }
but it throws a ClassNotFoundExceptionzokipirlo
12/14/2018, 9:32 AMzokipirlo
12/14/2018, 9:32 AMkagomez
12/14/2018, 11:47 AMzokipirlo
12/14/2018, 1:14 PM