Top "Fragmenttransaction" questions

FragmentTransaction is an API for performing a set of Fragment operations.

NullPointerException : FragmentManager.beginTransaction()

I'm getting this error while trying to launch a Fragment from a first Fragment : java.lang.NullPointerException: Attempt to invoke …

android nullpointerexception fragment fragmenttransaction
Navigation Drawer lag on Android

I'm having a problem with Navigation Drawer , it is too slow, the solution I'm looking for is to close the …

java android navigation-drawer fragmenttransaction
FragmentTransaction : replace and addToBackStack not working together?

I'm fairly new to Android development and now running in to weird behaviour. I have an empty FrameLayout to be …

android android-fragments fragmenttransaction
Is it OK to addToBackStack and replace in a fragment transaction?

Any thoughts on the following code? In my testing I've found the replaced fragment isn't destroyed and the instance is …

android android-fragments fragmenttransaction
How is the new FragmentTransaction commitNow() working internally?

The new commitNow() method added in Android N and support library version 24 has a limited and a bit confusing documentation. …

android fragmenttransaction
Clicking back button after a Fragment transaction using addToBackStack does nothing

I want to be able to reverse a replace FragmentTransaction by using addToBackStack(): FragmentTransaction fragmentTransaction = getActivity().getSupportFragmentManager().beginTransaction(); Fragment scheduleFragment = …

android android-fragments fragmenttransaction
DrawerLayout's item click - When is the right time to replace fragment?

I'm developing an application which uses the navigation drawer pattern (With DrawerLayout). Each click on a drawer's item, replaces the …

android android-fragments navigation-drawer fragmenttransaction drawerlayout
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
How to fix InstantiationException, unable to instantiate Fragment?

This is my first post, so I apologize in advance... I'm trying to compile a simple Drawer sample/practice app. …

android android-fragments navigation-drawer fragmenttransaction instantiationexception
how to setCustomAnimations for FragmentTransaction on this code

i have 5 fragments and I use the following code to setCustomAnimations for FragmentTransaction: FragmentTransaction trans = getFragmentManager().beginTransaction(); trans.setCustomAnimations(android.…

android fragmenttransaction