Category : android-architecture-components

I created project from sample "Navigation drawer activity". Navigation icon works fine for top level and other destination. Navigation icon morphs from "hamburger" to "arrow" and back. Issue Ok. Now I need to implement full-screen dialog as it recommended for dialogs with keyboard input. I created dialog fragment destination according documentation: ProductCountChangeFragment.kt internal class ProductCountChangeFragment ..

Read more

I’m currently working on an app designed to be Single activity app.The app has a screen that contains bottom navigation and its own fragmentContainer(with navigation graph). I want to be able to change the main fragment container.In other words, when an event happens in childFragment container, the parent container should change. Like this I tried ..

Read more

I’m trying to get myself familiar with DataStore, so in my current project I’m trying to use it. In my dependency. I’ve added : implementation "androidx.datastore:datastore-preferences:1.0.0-alpha06" Then I created this class to handle data-store: class BasicDataStore(context: Context) : PrefsDataStore( context, PREF_FILE_BASIC ), BasicImpl { override val serviceRunning: Flow<Boolean> get() = dataStore.data.map { preferences -> preferences[SERVICE_RUNNING_KEY] ..

Read more

I build up a pagedlist recyclerview but something don´t work and I can´t figure out what is wrong because I don´t have much knowledge in this topic. 1. I got a retrofit response in form of: [{id:1,name:x,location:x},{id:2,name:xx,location:xx},{id:3,name:xxx,location:xxx}] 2. I convert it with a custom gsonconvertfactory in form of : {id:1,name:x,location:x},{id:2,name:xx,location:xx},{id:3,name:xxx,location:xxx} To that point everything worked. ..

Read more

I am using Koin for DI but I’m trying to eliminate dependencies on DI framework so my question is about Android Architecture Components in general. It is possible to provide an instance of ViewModel by property delegate in the fragment but it causes coupling between fragment and DI framework. So I came up with a ..

Read more