pollux-
10/09/2020, 11:29 PMokarm
10/10/2020, 2:19 PMoutadoc
10/13/2020, 8:34 AMcontinue
in a for/when loop, the editor will show an error but the project compiles fine?
Either way both Google and Jetbrain’s docs are not clear on the subject 😞Slackbot
10/13/2020, 8:51 PMLiyue
10/14/2020, 4:03 AMPau
10/14/2020, 7:20 AMAyden
10/14/2020, 9:59 AMDialog
after the onClick action?
The onClick
action is bound with the QuoteViewModel
.
I would assume the ViewModel
should not in charge of closing the Dialog
, since the responsiblity of the ViewModel is to process and manipulate the data.
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_submit_quote"
...
android:onClick="@{(view) -> quoteViewModel.save()}"
android:text="@string/submit"
... />
Leandro Ocampo
10/14/2020, 4:15 PMtasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
compileTask -> compileTask.dependsOn ":custom-create-plugin:createNewPlugin"
}
What I need is to make this compileTask to depend on this task only for release builds. Any ideas?
I already tried something like this without success:
if (getGradle().getStartParameter().getTaskRequests().toString().contains("release")){
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
compileTask -> compileTask.dependsOn ":custom-create-plugin:createNewPlugin"
}
}
Afzal Najam
10/14/2020, 5:18 PMviewModelScope.cancel()
In ViewModels?
I see that the documentation for ViewModel.kt says:
* This scope will be canceled when ViewModel will be cleared, i.e [ViewModel.onCleared] is calledBut I can't find the code that actually calls
close()
Robby
10/14/2020, 6:16 PMMatthew Laser
10/14/2020, 6:26 PMOrhan Tozan
10/15/2020, 1:05 PMviewModel.notes.observeInLifecycleScope { notes ->
viewBinding.informationTextInput.text = notes
// Fix for mysterious bug when the family notes textview doesnt update when navigated from home screen.
lifecycleScope.launch {
viewBinding.informationTextInput.isVisible = false
viewBinding.informationTextInput.isVisible = true
repeat(10) {
delay(100)
viewBinding.informationTextInput.isVisible = false
viewBinding.informationTextInput.isVisible = true
}
}
}
There is this mysterious bug where screen A works fine when navigated from screen B(screen B -> screen A) . But when navigated from screen C -> screen A, there is this small chance the textview showing weird, empty content. The code under the comment hilariously fixes that issue... but still have no clue why 😂tarek
10/15/2020, 1:46 PMNoSuchMethodError: 'void com.android.build.gradle.internal.dsl.DefaultConfig.setApplicationId(java.lang.String)'
Any ideas?Florian
10/15/2020, 4:15 PMFlorian
10/15/2020, 8:44 PMKV
10/16/2020, 5:09 AMretrofit
Example :
1. https://baseurl/search/q[name_eq]=Example
2. https://baseurl/search/q[name_not_eq]=Example
3. https://baseurl/search/q[name_not_eq]=Example
4. https://baseurl/search/q[name_matches_all]=Example
5. ----
6. ----
7. ----
I don't want to write different api calls with different search criteria.
Do we have any simpler way to handle this kind of url for calling the same API with different parameters?Slackbot
10/16/2020, 7:10 AMcoroutinedispatcher
10/16/2020, 9:31 AMSlackbot
10/16/2020, 9:47 AMSlackbot
10/16/2020, 4:18 PMSlackbot
10/17/2020, 12:54 PMziv kesten
10/17/2020, 1:40 PMAyden
10/18/2020, 3:52 AMonClickListener
, itemClicklLisntener
in my MainActivity.kt
which will response to user onClick activity.
Question
But why the view model does not display the value on the fragment?
MainActivity - <https://pastebin.com/4Zp492kn>
QuoteAdapter - <https://pastebin.com/WGSVdh6H>
QuoteViewModel - <https://pastebin.com/X6mv0pH7>
QuoteFragmentLayout -<https://pastebin.com/U4Qcm902>
Marek Kubiczek
10/18/2020, 11:58 AMPopupWindow
above DialogFragment
? I would like to show BottomSheetDialogFragment
with a context menu and at the same time be able to show a clickable PopupWindow
above the bottom sheet. Whatever I tried the popup was always shown behind the BottomSheet's outsideTouchArea making the popup unable to intercept touches. When looking at layout inspector the PopupDecorView
was always placed below Dialog's DecorView
.Sergio C.
10/18/2020, 7:09 PMMichael
10/18/2020, 8:08 PMxxfast
10/19/2020, 12:21 AMkevin.cianfarini
10/19/2020, 2:57 AMimplementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation "androidx.fragment:fragment-ktx:1.2.5"
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation "com.squareup.retrofit2:converter-moshi:2.9.0"
implementation "com.squareup.moshi:moshi-kotlin-codegen:1.11.0"
kapt "com.squareup.moshi:moshi-kotlin-codegen:1.11.0"
implementation 'com.google.dagger:hilt-android:2.29.1-alpha'
kapt 'com.google.dagger:hilt-android-compiler:2.29.1-alpha'
implementation 'androidx.hilt:hilt-lifecycle-viewmodel:1.0.0-alpha02'
kapt 'androidx.hilt:hilt-compiler:1.0.0-alpha02'
Cannot fit requested classes in a single dex file (# methods: 70231 > 65536)
Sam
10/19/2020, 9:05 AMLeandro Ocampo
10/19/2020, 10:49 AMval someView by lazy { findViewById(R.id.some_view) }
?
My concern is can happen that an Activity / Fragment may need to recreate (inflate again) the view but being the same object? Let's say onCreate (activity) or onCreateView (fragment) is called again for the same object
I think it is safe to do this in an activity, but I do not think so for Fragments 🤔Leandro Ocampo
10/19/2020, 10:49 AMval someView by lazy { findViewById(R.id.some_view) }
?
My concern is can happen that an Activity / Fragment may need to recreate (inflate again) the view but being the same object? Let's say onCreate (activity) or onCreateView (fragment) is called again for the same object
I think it is safe to do this in an activity, but I do not think so for Fragments 🤔gildor
10/19/2020, 11:19 AM