Top "Fragment" questions

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

OnItemClickListener on a ListView inside a Fragment not working

EDIT: SOLVED. If there's anything focusable in the XML of the items, it will break the touch of the list, …

android listview fragment onclicklistener
Android get layout height and width in a fragment

I am working on a fragment and I want to get the dimension of a layout contained in the xml …

android layout fragment dimension
what is the different between onCreate() and onCreateView() lifecycle methods in Fragment?

I don't know when to use onCreate() or onCreateView(). I have used onCreate() and onCreateView() lifecycle methods. I think onCreate() …

android android-fragments android-activity fragment oncreate
Fragment not receiving menu callbacks

I have a fragment class that extends Fragment and calls setHasOptionsMenu to participate in the menu. This class also implements …

android android-fragments fragment
If I declare a fragment in an XML layout, how do I pass it a Bundle?

I've got an activity that I've replaced with a fragment. The activity took an Intent that had some extra information …

java android xml fragment
difference between fragmentTransaction.add and fragmentTransaction.replace

What I already known is: after fragmentTransaction.replace(), current fragment's onStop() function will be called while fragmentTransaction.add() won't. and …

android android-fragments fragment
How to animate fragment removal

I want to animate the removal of fragment. I tried: getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.push_down_in, R.anim.…

android animation fragment
Can a ListView contain Fragments

As in, can the ELEMENTS of a ListView be Fragments. I know that you can assign a TextView XML to …

android listview android-arrayadapter fragment
GetFragmentManager.findFragmentByTag() returns null

getFragmentManager().beginTransaction() .replace(R.id.graph_fragment_holder, new GraphFragment(), "GRAPH_FRAGMENT") .commit(); getFragmentManager().beginTransaction() .replace(R.id.list_fragment_…

android android-fragments fragment
Android: How to prevent the back button from cancelling a DialogFragment

I have a Fragment that can create and pop up a DialogFragment, but when I hit the back button, it …

android android-asynctask progressdialog fragment back-button