Top "Fragment" questions

**DO NOT USE**: fragment is an ambiguous tag, used to refer to numerous technologies.

Proper use of sub sub fragments with (Child)FragmentManager

How do I properly use Fragments in Fragments? My (simplified) use case is following, I have an activity with a …

android fragment fragmentmanager
How to get a reference to LocationManager inside a Fragment

I have a class that extends Fragment and implements LocationListener. When I write LocationManager myLocalManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE); …

android fragment locationmanager
How to pass data from a fragment to a dialogFragment

I know that this was asked before, but I dont quite understand how to implement it. I have a fragment "…

android arguments fragment
Fragment - InstantiationException: no empty Constructor -> Google Maps v2?

I get this error message, when I open a closed App again via App-Change button: Caused by: java.lang.InstantiationException: …

android constructor fragment instantiationexception
How to use Parcelable in fragment for getting data?

I can use Parcelable in Activity but I don't know how to use it in Fragment. I have a ListFragment …

android fragment parcelable
how to get the onWindowFocusChanged on Fragment?

I am using Android Sliding Menu using Navigation Drawer. I know that onWindowFocusChanged work on MainActivity. How can I check …

android fragment
Prevent activity from being destroyed as long as possible

I have an app, a single activity app with fragments in it. The usual use case for this app is, …

android android-activity fragment android-lifecycle
Android : Accessing container activity object from fragment using putExtra?

I am building a tab interface using Action bar and fragment. I would need assistance in sending data from container …

android android-fragments fragment android-tabs
ViewPager FragmentPagerAdapter Nullpointer

I got this error by using the ViewPager in the Android Support package. from the Horizontal View Swiping with ViewPager …

android fragment android-viewpager
Fragment isAdded() returns false on an already added Fragment

I have this neat function: private void addMapFragment(){ if(!mapFragment.isAdded()){ FragmentTransaction ft = getFragmentManager().beginTransaction(); ft.add(R.id.mapContainer, …

android fragment fragmenttransaction