Questions tagged [android-architecture-lifecycle]

68 questions
0
votes
1 answer

Could not resolve all files for configuration

I just implemented the Android Architecture Library in my Android project, everything works fine when i build the app gradle module, but i can't test it on a physical/emulator device this shows up on the message gradle build Error:Could not resolve…
0
votes
1 answer

Custom semi-generalized Factory for ViewModels

I'm trying to create a generalized ViewModelProvider.Factory to instantiate my ViewModels class BundledAppFactory(private var bundle: AppParameterBundle) : ViewModelProvider.NewInstanceFactory() { override fun create(modelClass:…
0
votes
1 answer

Please explain android architecture when using "First offline aproach".

my app architecture, quite common: Please explain me if I have list of Entities, for example @Entity(tableName = TABLE_NAME) class Item constructor( @PrimaryKey(autoGenerate = false) var id: Long = 0L, …
0
votes
1 answer

Fragment lifecycle on visibility changed

In my app I have two fragments and one of them (FragmentSlidingUp) can slide up and cover the other one (FragmentContent) completely. I use this library for the sliding up https://github.com/umano/AndroidSlidingUpPanel. The problem I have is that…
0
votes
0 answers

how to use the LifecycleRegistryOwner to keep the broadcast receiver alive only when the activity is alive

Having some problem to receive the broadcast from third part lib in some case. (only care the broadcast when the particular activity is alive.) One use case is (when turn on the ‘Don’t keep activity alive), in the activity it lunches another…
lannyf
  • 9,865
  • 12
  • 70
  • 152
0
votes
2 answers

is it nessary to use Rxlifecycle with android-arch-lifecycle component?

If android-arch-lifecycle component is used in a app, is it necessary to use Rxlifecycle? or is Rxlifecycle redundant? or If I used Rxlifecycle and RxJava, is it necessary to use android-arch-lifecycle component?
-1
votes
1 answer

Android MVVM. Is life-cycle aware Model a code smell or a proper design?

For my activity I need to know the connectivity state of the phone. Since this is the data that my UI needs to react to, it falls into a Model realm of MVVM (please let me know if you disagree). To not execute code when not needed, my model code is…
-1
votes
1 answer

Not able to get the LifeCycle ViewModel Class Using ViewModelProvider

I am trying to get the ViewModel Class for the specific fragment. But ViewModelProvider.of(this).get(UserListViewModel.class) does not work for me. Extending my Fragment from "android.support.v4.app.Fragment", but still it does not…
1 2 3 4
5