Questions tagged [android-fragmentactivity]

An Activity subclass introduced through the compatibility package to provide an implementation of the Fragment framework on version below Honeycomb.

An Activity subclass introduced through the compatibility package to provide an implementation of the Fragment framework on version below Honeycomb. This class doesn't work with Fragments from the SDK, it needs the Fragment related classes from the compatibility package.

More information can be found in the documentation of the FragmentActivity.

2111 questions
6
votes
1 answer

Fragment overlaps sometimes when switching tabs

I have a two pane layout with my buttons on the left. When a button is pressed its corresponding fragment is displayed on the right. Sometimes the fragments overlap but this is an intermittent issue. I can't replicate it all the time but it does…
DMC
  • 1,184
  • 5
  • 21
  • 50
6
votes
1 answer

Fragment creation in onCreate?

I'm reading Programming for Android and in the book it says: It is entirely possible that an activitys onCreate will be called while it is still associated with a previously created fragment. Simply adding a new fragment whenever onCreate method is…
6
votes
1 answer

FragmentActivity with ViewPager: Crash on orientation change

I have used ViewPager in FragmentActivity. I am getting a crash when orientation changes. @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_list); context…
6
votes
1 answer

Blank page is shown when pop the fragment & replace to the same fragment again

I have 3 fragments, Frag_A, Frag_B & Frag_C. My navigation logic is: Frag_A ==> Frag_B ==> Frag_C . That's Frag_A is added into layout firstly, so, at the first time, Frag_A is shown on screen, then, if user press the Next Button, Frag_A is…
6
votes
5 answers

Google Map V2 android error Inflating class fragment error

I am creating an application with tab and I have map in one of the tab, when I open map from it works fine and when I visit some other tab that time also it works fine, but when I come back to the map tab app crashes with this error. 04-09…
6
votes
1 answer

intercept DialogFragment dismiss inside activity

I have an activity public class ShowFileActivity extends FragmentActivity and when occours some event, this class call a DialogFragment public class ConfirmDialog extends DialogFragment that is a simple confirm dialog (with "dismiss" and "ok"…
giozh
  • 9,868
  • 30
  • 102
  • 183
6
votes
3 answers

ViewPager with Fragments that contain TableLayouts loads slowly:

I'm developing an Activity with a ViewPager that contains Fragments (Max 4 fragment each time) when each containing TableLayout. So basically 4 Tables are loaded. This is the code for loading the data into the Fragment which is later attached to the…
6
votes
4 answers

Handle Fragment duplication on Screen Rotate (with sample code)

There are some similar answers, but not to this situation. My situation is simple. I have an Activity with two different layouts, one in Portrait, another in Landscape. In Portrait, i use and add Fragment into it dynamically. In…
6
votes
3 answers

How to disable the window's title in a FragmentActivity?

In my activity that extends the FragmentActivity class, I can't disable the title using this.requestWindowFeature(Window.FEATURE_NO_TITLE);. It gives an ANR. How can I disable a FragmentActivity's title? This is the partial code of the activity's…
6
votes
2 answers

Fragment member variables getting null when accessed in onPageSelected()

I'm using FragmentPagerAdapter with FragmentActivity to create swipe-able Fragments. My first fragment in that pagerAdapter look like this. public class MySummaryFragment extends CommonFragment implements OnPageChangeListener { private Context…
6
votes
1 answer

Can some draw lifecycle of Fragment and its parent FragmentActivity?

In Android docs, I found a specs on Activity lifecycle and on Fragment lifecycle individually, but never together. It does not seem obvious as I attached a debugger to FragmentActivity which hosts my fragment, and the life cycle is more than crazy.…
6
votes
1 answer

Start FragmentActivity from Activity

How can I start a FragmentActivity from an Activity? My MainActivity is a splash screen and I want to star a FragmentActivity next. I need something instead of, for example: startActivity(new…
user1537004
6
votes
2 answers

Embedding Cordova WebView, Receiver is not registered

I have embedded the Cordova WebvView as a component to my project, everything works fine except one thing; when the back button is pressed I get an error on LogCat which says "Receiver Not Registered !" I dont think I have registered a receiver.…
osayilgan
  • 5,873
  • 7
  • 47
  • 68
6
votes
1 answer

Getting SupportFragmentManager without extending FragmentActivity

I want to use Fragments in my application, but I cannot extend FragmentActivity because my application already extends an activity that is part of a library. Since this means that I cannot call getSupportFragmentManager(), I am looking for a…
JohnEye
  • 6,436
  • 4
  • 41
  • 67
6
votes
1 answer

Where is FragmentActivity#onDetachFragment?

Every time I attach a fragment to my activity, I want to register it to receive events from the activity. This is easy, because I can override FragmentActivity#onAttachFragment(Fragment). When the fragment is removed from the activity, I want to…
Edward Dale
  • 29,597
  • 13
  • 90
  • 129