Top "Android-lifecycle" questions

Questions regarding the events forwarded by the system to components, during their lifetime, in an Android Application.

fragment lifecycle: when "ondestroy" and "ondestroyview" are not called?

Imagine this scenario: I have a Fragment in a Pager. I try to switch to other apps, so that the …

android android-fragments android-lifecycle
Fragment lifecycle with respect to it's activity

Situation My activity waits on an Async operation and after it hears back from async operation, it needs to pass …

android fragment android-lifecycle
Display fragment viewpager within a fragment

I have a fragment which contains a ViewPager. The ViewPager is associated with an adapter that contains a set of …

android android-fragments android-viewpager android-lifecycle android-nested-fragment
Android static object lifecycle

I am creating event search application, we set search criteria from one screen populate in another screen then user can …

android static android-lifecycle static-members
when is onRestoreInstanceState called?

Sorry for my incomprehension, but I am new in the android development. I have an application with activity A and …

android android-lifecycle onsaveinstancestate onrestoreinstancestate
Android Fragment onCreateView vs. onActivityCreated

I know that a fragment's view hierarchy has to be inflated in onCreateView, but what other functionality can be in …

android android-fragments lifecycle android-activity android-lifecycle
What is lifecycle for RecyclerView adapter?

I'm requesting images from presenter in adapter: @Override public void onBindViewHolder(SiteAdapter.ViewHolder holder, int position) { Site site = sites.get(…

android android-recyclerview android-lifecycle
Why is my onResume being called twice?

Basically, this is what I'm doing 1) Set AlarmManager to execute BroadcastReceiver (BCR) Intent intent = new Intent(m_Context, BCR.class); …

java android android-activity android-lifecycle
View pager and fragment lifecycle

I have a ViewPager that loads three pages at a time. If I swipe from page 1 to page 2 then to 3, …

android android-fragments android-viewpager android-lifecycle
Failed to resolve: android.arch.lifecycle:extensions:1.0.0-alpha1 android studio 3.0

I am building a project in android studio 3.0 with android plugin 'com.android.tools.build:gradle:3.0.0-alpha1' and gradle …

android android-lifecycle android-studio-3.0 android-architecture-components