bringoff
11/28/2017, 6:51 AMgetActivity
in Fragment got @Nullable
annotation. But what should I do now in following situations? For example, I build DialogFragment. I need a context in onCreateDialog
method. To do something like this:
return MaterialDialog.Builder(context)
.title(R.string.invitation_to_team_dialog_title)
.content(buildDescriptionText())
.build()
onCreateDialog
method must return NonNull Dialog instance so I can’t use context?.let
call. And I really doubt context may be null on this stage (as well as activity in Fragment’s onCreateView
method, I suppose?). So I forced to use ugly !!
call. @jw as I know from your twitter these annotations were your endeavor. So, from your opinion, what should be an intended workaround in this situation? I don’t really like double exclamation point. It looks like very Java-ish way to care about nullability, sort of “I don’t care, whatever”Fré Dumazy
11/28/2017, 8:08 AMfjanicki
11/28/2017, 10:24 PMadam-mcneilly
11/29/2017, 3:01 AM./gradlew cAT
in the terminal, it works fine?ghosalmartin
11/29/2017, 10:37 AMburak.eregar
11/29/2017, 12:04 PMScott
11/29/2017, 2:28 PMclass DAO(){
fun fetchPicture(){
// Code...
}
inner class InnerClass : AsyncTask<String, Int, Bitmap>() {
override fun doInBackground(vararg params: String?): Bitmap {
var network = NetworkingDAO
// Following line fails with "Unresolved Refereence: fetchPicture"
network.fetchPicture(picture[0])
}
}
}
itnoles
11/30/2017, 3:25 AMstkent
11/30/2017, 3:22 PMkotlin-android
plugin available, and if so, where does it live?dave08
11/30/2017, 4:45 PMjw
11/30/2017, 4:46 PMburak.eregar
11/30/2017, 5:02 PMburak.eregar
11/30/2017, 5:12 PMmoetouban
12/01/2017, 12:15 PMburak.eregar
12/02/2017, 12:33 AMkchau
12/03/2017, 10:33 PMaljosa
12/04/2017, 2:33 AManstaendig
12/04/2017, 7:45 AMdave08
12/04/2017, 12:36 PMError:(31, 26) 'use((T) -> R): R' is only available since Kotlin 1.2 and cannot be used in Kotlin 1.1. Requires newer compiler version to be inlined correctly.
updating to 1.2 (from 1.1.51)?kevin_abrioux
12/04/2017, 3:48 PMrohit1899
12/05/2017, 5:40 AMJames Coggan
12/05/2017, 9:43 AM1.2.0-release-Studio3.0-1
is the version you will use as a plugin in AndroidStudio, 1.2.0
if for your gradle dependencyjovmit
12/05/2017, 2:38 PMghosalmartin
12/05/2017, 5:46 PMurs-vj
12/06/2017, 7:15 PMgildor
12/07/2017, 2:56 AMmnawrot
12/07/2017, 11:32 AMContext
var/val in your class and in the end you want to clean it/set to null to prevent memory leaks? var Context?
, WeakReference<Context>
?dylan
12/07/2017, 2:49 PMmanijshrestha
12/07/2017, 7:06 PMadams2
12/07/2017, 7:22 PMadams2
12/07/2017, 7:22 PM