adams2
06/04/2019, 5:54 PMsrc/debug/res/layout
Jarek
06/04/2019, 6:07 PMGautam Lad
06/05/2019, 2:34 AMviewModelScope.launch(<http://Dispatchers.IO|Dispatchers.IO>) {
contentLiveData.postValue(getDiscoverContentUseCase.execute())
}
If I put a breakpoint on launch line I see it’s cancelled.
viewModelScope = {CloseableCoroutineScope@5985}
coroutineContext = {CombinedContext@5986} "[SupervisorJobImpl{Cancelled}@7ed8dea, Main]"
itnoles
06/06/2019, 5:14 AMSlackbot
06/06/2019, 2:41 PMMark
06/06/2019, 2:48 PMCREATE INDEX
SQLite statements in a coroutine (not using Room). SQLiteConnectionPool: The connection pool for database '+path+to+my_db' has been unable to grant a connection to thread 2676 (DefaultDispatcher-worker-8) with flags 0x2 for 12.003 seconds.
Connections: 0 active, 1 idle, 0 available.
It only ever (not always) happens if I call yield()
in between each execSQL
. Is it something to do with SQLite not liking being accessed by different threads within the same transaction (which I’m guessing might happen when using yield()
)?Uraniam9
06/07/2019, 4:26 AMJohncarloespiritu
06/07/2019, 12:05 PMpavi2410
06/07/2019, 5:39 PMSergey Burlaka
06/09/2019, 8:04 PMAnimesh
06/10/2019, 6:58 AMOlivier Patry
06/10/2019, 10:48 AMContentResolver
query.
I'd like to filter either by name or email in a single query.
I tried CONTENT_FILTER_URI
which helps filtering display name properly but can't combine with email lookup.
Using CONTENT_URI
to query non empty emails starting with a string gives poor results regarding display name matching (accented letters, first name / last name).
Do you have some hints to combine both of two worlds in a single query?Fanzheyuan
06/10/2019, 12:51 PMlawlorslaw
06/11/2019, 6:41 AMTheDukerChip
06/11/2019, 7:06 AMenums
are restricted to use because it takes a bit large memory
https://www.youtube.com/watch?v=Hzs6OBcvNQE▾
enum
android suggested to use the TypeDef
according to the above video.
Can we use the `enum`'s in kotlin or we should go with the any alternatives?Vladimir Ivanov
06/11/2019, 12:36 PMUraniam9
06/11/2019, 3:07 PMUraniam9
06/11/2019, 3:07 PMTheDukerChip
06/12/2019, 12:57 PMandroid/kotlin
. But I don't know where else to ask thiswilliam
06/12/2019, 4:34 PMonDestroy
or something similar? the manual useage of a nullable view seems very un-kotlinzokipirlo
06/13/2019, 6:11 AMescodro
06/13/2019, 9:32 AMinternal
? Similar to suggest when a class can be package-private
in Java.K0NN4
06/13/2019, 4:42 PMclass MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
SpotifyService.connect(this) {
spotifyAppRemote?.let {
it.playerApi.subscribeToPlayerState().setEventCallback {
val track: Track = it.track
Log.d("MainActivity", track.name + " by " + track.artist.name)
ALabel.text = track.name
Blabel.text = track.artist.name
var SongName = track.name
var SongArtist = track.artist.name
}
}
}
GeniusApi.PrintSomething()
}
}
object GeniusApi {
val BASE_URL = "<https://api.genius.com>"
val SEARCH_URL = BASE_URL + "/search"
var DATA = SongName@MainActivity
fun PrintSomething() {
Log.e("GeniusApi", DATA)
}
}
Joao Birk
06/13/2019, 5:59 PMgrzesiekmq
06/14/2019, 5:45 PMkevin.cianfarini
06/14/2019, 5:46 PMCall<Unit>
or Call<Void>
?Allan Wang
06/15/2019, 9:55 PM@BindingAdapter("android:languageColor")
fun TextView.languageColor(color: String?) {
Usage
android:languageColor="@{repo.primaryLanguage.color}"
I’ve verified that
• TextView is the correct class (not appcompat)
• Input is nullable (also tried Any?
)
And I’ve tried the label as languageColor
.
The IDE correctly autosuggests the name, but I’m getting the error:
****/ data binding error ****msg:Cannot find the setter for attribute 'android:languageColor' with parameter type java.lang.String on android.widget.TextView.
Edit: Also just checked and it works fine with javaTuan Kiet
06/16/2019, 10:55 AMmyanmarking
06/17/2019, 9:56 AMmyanmarking
06/17/2019, 9:59 AMpublic void clearView(@NotNull RecyclerView recyclerView, @NotNull ViewHolder viewHolder) {
Intrinsics.checkParameterIsNotNull(recyclerView, "recyclerView");
Intrinsics.checkParameterIsNotNull(viewHolder, "viewHolder");
super.clearView(recyclerView, viewHolder);
...
}
myanmarking
06/17/2019, 9:59 AMpublic void clearView(@NotNull RecyclerView recyclerView, @NotNull ViewHolder viewHolder) {
Intrinsics.checkParameterIsNotNull(recyclerView, "recyclerView");
Intrinsics.checkParameterIsNotNull(viewHolder, "viewHolder");
super.clearView(recyclerView, viewHolder);
...
}
tseisel
06/17/2019, 11:54 AMclearView
parameters are annotated with @NonNull
, the Kotlin compiler overrides then as non-null. For Java interop, any function that can be called from Java code is protected by those intrinsics
checks.
Maybe you could file a bug for that AndroidX library, as the non-null constract is violated. As a workaround, try setting those parameters as nullable in Kotlin: this should remove the intrinsics checks.