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
11
votes
1 answer

Fragments restore state on orientation changed

I have to implement "standart" fragments navigation in my app (please see link). The issue is when device is in portrait mode, there should be shown only 1 fragment, and when it is rotated to landscape mode, 2 fragments should be shown. I tried to…
11
votes
2 answers

Selecting Image from gallery using fragment

I am trying to get image from gallery using fragment which is called from fragmentactivity but onActivityResult of the fragment class is not being called. I found out that this may happen due to the onActivityResultof the FragmentActivity class but…
lil'ms
  • 452
  • 3
  • 5
  • 17
11
votes
1 answer

How to add a page to the beginning of ViewPager?

About my application I am developing a calendar application.Want to show monthview with horizontal swipe navigation? Which means an infinite scrolling User can scroll to right and left monthwise to any date/month of any year. I found ViewPager is…
Renjith K N
  • 2,613
  • 2
  • 31
  • 53
11
votes
2 answers

Adding PreferenceFragment to FragmentPagerAdapter

I am trying to add a PreferenceFragment to a FragmentPagerAdapter. My class extends FragmentActivity, I have tried FragmentTransaction, as shown below as well as trying to add to the container and can't seem to get anything to work. No errors are…
jnthnjns
  • 8,962
  • 4
  • 42
  • 65
11
votes
3 answers

Handling PagerTitleStrip click in compatibiliy Fragment-based ViewPager

I have a compatibility ViewPager with an embedded PagerTitleStrip element and it works fine but clicks on the PagerTitleStrip do not switch to the corresponding view as expected. I have looked through the docs but the widget does not have any…
ccpizza
  • 28,968
  • 18
  • 162
  • 169
10
votes
4 answers

How to replace a DialogFragment by another DialogFragment?

We add a general/normal Fragment programatically by doing something like: fragmentTransaction.add(containerViewId, fragmentToAdd, fragmentTag); and we replace a Fragment by another by doing something…
10
votes
2 answers

How fix this: on logcat -->> error loading /system/media/audio/ui/Effect_Tick.ogg??

I have a problem: error loading /system/media/audio/ui/Effect_Tick.ogg It's shown when I click navdraw icon. Anybody can help me?? This is errors on logcat: 04-20 01:42:11.240: E/SoundPool(639): error loading…
10
votes
4 answers

Replacing Fragment in ViewPager shows blank screen?

I'm having a lot of trouble getting Fragments to work with Tabs/Swiping. I have one activity and two Fragments, one which has a ListView. What I want is when I swipe from fragment 1 to the fragment with the ListView, to refresh the ListView or if…
10
votes
2 answers

Android Fragment View State Loss When Using FragmentTransaction.replace()

I am having a pretty big issue and I am not quite understanding what is happening. I am developing an application that uses Fragments (from the support library) and am using FragmentTransaction.replace() to place new Fragments on to the back stack…
10
votes
2 answers

Tabs + ViewPager + FragmentStatePagerAdapter - How to remove fragment?

I'm using the "Tabs + Swipe" project and I'm having a difficult time removing a fragment. Steps I'm doing: Remove tab from database Remove tab from the FragmentStatePagerAdapter data source Remove tab from the actionBar. Remove fragment using…
Lior Iluz
  • 26,213
  • 16
  • 65
  • 114
10
votes
3 answers

How update ListView in ListFragment from FragmentActivity?

I'm using a ListFragment within an FragmentActivity together with a SimpleCursorAdapter and a modified CursorLoader. The modified CursorLoader simply issues rawQueries - no other changes. At some point in the FragmentActivity I need to refetch the…
9
votes
2 answers

Jar-file issue with ADT r17

I seem to have a tricky problem since the latest ADT update to release 17. I have made a simple application to illustrate my problem, I don't know if I'm doing anything wrong. The main Activity of my application is inheriting from FragmentActivity…
eMich
  • 1,736
  • 1
  • 14
  • 16
9
votes
3 answers

Is Fragment an Activity? (Android)

Is Fragment an Activity? and what is difference between fragment and FragmentActivity?
9
votes
1 answer

ChildFragmentManager java.lang.IllegalStateException: Activity has been destroyed

I have tried to add a fragment inside another fragment inside viewpager using getChildFragmentManager(). I got following error, java.lang.IllegalStateException: Activity has been destroyed …
Ramprasad
  • 7,981
  • 20
  • 74
  • 135
9
votes
2 answers

How to start Fragment from Activity?

I have one Fragment: ProductsFragments extends Fragment and one Activity AdminMenuActivity extends ActionBarActivity I want to call ProductsFragments from AdminMenuActivity. I have used 2 options: 1) FragmentManager fm =…
Rudra
  • 241
  • 1
  • 3
  • 9