Top "Android-fragments" questions

Fragments represent reusable behaviors or portions of the user interface in an Android app.

What is the difference between FragmentPagerAdapter and FragmentStatePagerAdapter?

What is the difference between FragmentPagerAdapter and FragmentStatePagerAdapter? About FragmentPagerAdapter Google's guide says: This version of the pager is best …

android android-fragments android-viewpager fragmentpageradapter fragmentstatepageradapter
Get the Application Context In Fragment In Android?

I have stored some data to a Global Class By using the Application Context In One Activity. Later I have …

android android-fragments fragment
onCreateOptionsMenu inside Fragments

I have placed setHasOptionsMenu(true) inside onCreateView, but I still can't call onCreateOptionsMenu inside fragments. @Override public View onCreateView(LayoutInflater …

android android-fragments layout-inflater oncreateoptionsmenu
Receive result from DialogFragment

I am using DialogFragments for a number of things: choosing item from list, entering text. What is the best way …

android dialog android-fragments fragment dismiss
How to add a fragment to a programmatically generated layout?

I have the following code working which generates fragments, but only if I am adding them to a linear layout …

android android-fragments android-linearlayout
Difference between Activity and FragmentActivity

I was working on fragments and came across two things Activity and FragmentActivity which are used several times. I want …

android android-fragments android-support-library android-fragmentactivity
Cannot resolve method 'getSupportFragmentManager ( )' inside Fragment

I found the message Cannot resolve method 'getSupportFragmentManager ( )' I want to fragment as activity. because I want to use …

android google-maps android-fragments fragment
runOnUiThread in fragment

I'm trying to convert an Activity to fragment. The error mark on runOnUiThread. on the past: GoogleActivityV2 extends from Activity. …

android android-fragments android-activity
How to add Action bar options menu in Android Fragments

I am trying to have a options menu in Android Fragments. ActionBar options menu are not displaying in my Fragments. …

android android-fragments android-actionbar android-optionsmenu
How to move from one fragment to another fragment on click of an ImageView in Android?

I have an ImageView. I want to move from one fragment to another fragment on a click of an Imageview, …

android android-fragments fragment