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

Child fragment gets destroyed for no good reason

Info: I have a 2 pane layout (2 child Fragments) inside a ParentFragment, which, of course, is inside a FragmentActivity. I have setRetainInstance(true) on the ParentFragment. On orientation change, the left child fragment doesn't get destroyed…
5
votes
3 answers

FragmentTabHost & Fragments - How do I pass data between tabs?

I have a MainActivity (FragmentActivity) that has a FragmentTabHost. public class FragmentTabs extends FragmentActivity { private FragmentTabHost mTabHost; @Override protected void onCreate(Bundle savedInstanceState) { …
5
votes
1 answer

Nested fragment with wrong activity reference after configuration change

I'm finally looking into the new nested fragments APIs in the support library revision 11. Everything It worked pretty well till I tried to use the activity reference held by the nested fragments. After a configuration change the childFragment…
5
votes
3 answers

How call onCreateView Method or refresh my fragment?

I would like to refresh or call onCreateView in the code following . I have a contex menù to delete an Item and after I would like to refresh the fragment with the new Item.. Thanks at all! public class ItemDetailFragmentBlackBoard extends Fragment…
alfo888_ibg
  • 1,847
  • 5
  • 25
  • 43
5
votes
2 answers

Hiding app title bar in Android pager

Can anyone tell how to hide the app title bar in Pager fragment.
Nemo
  • 1,059
  • 3
  • 14
  • 31
5
votes
1 answer

Creating a Fragment in a Popup Window - in Android

Is it possible to load a Fragment / FragmentActivity class on a PopupWindow? I need a PopupWindow with more than one site. On the first one should be some Buttons. With these Buttons you'll change the Layout of the Popup- and open a new one with,…
5
votes
1 answer

PageTabStrip Class Not Found Exception

Well i have decided to just go with the pagertitlestrip. I am assuming that the support library that i am using does not contain pagertabstrip. i am not sure how to fix this because i thought i had everything updated correctly. Edit: Does this just…
doubleA
  • 2,446
  • 22
  • 45
5
votes
2 answers

Replacement of TabActivity with FragmentActivity and Fragments

Since TabActivity is deprecated I need to find a way to do it with Fragments. I have worked with Fragments before I know how it works but I need a guide to create my tab host with FragmentActivities. I have found a couple of examples on the…
4
votes
1 answer

Android ViewPager2 how to retrieve the fragment onBindViewHolder

ViewPager release 1.0.0 version For a normal RecyclerView, holder.itemView gives me the view currently binding/ rendering. However, FragmentStateAdapter's holder.itemView only gives me a FrameLayout My ViewPager adapater: class…
4
votes
1 answer

Unable to Instantiate fragment (Could not find fragment constructor)

I'm facing this issue on some devices and getting an error on my crash analytics. this issue comes when the app is in trouble with ANR and the error is Unable to start activity…
Mohit Lakhanpal
  • 1,309
  • 3
  • 11
  • 19
4
votes
2 answers

Android, reload or refresh current fragment after click "ok" in DIALOG

This is my dialog inside fragment it works fine, now I want that when i click "ok" button it reload the current fragment. the dialog is show when the method showDialog is called: mi fragment is android.support.v4.app.Fragment void showDialog() { …
matQ
  • 597
  • 2
  • 13
  • 27
4
votes
2 answers

Add Button to Graphics Canvas

I was using the answer to this question: Drawing on Canvas and save image in order to create a canvas to draw an image on. I am currently opening a FragmentActivity called DrawImage when a button is clicked. In this activity I want MyDrawView to be…
4
votes
2 answers

Default fragment in activity

I've seen many posts on this matter, but I can't figure it out for my code. I have created a tabbed activity and set three buttons at the bottom. The buttons switch between different fragments. A button in a MainActivity opens this tabbed activity,…
4
votes
2 answers

How to convert an activity to a fragment in Android Studio?

I have this activity package com.padilla.jorge.proyecto_aplicaciones_moviles; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import…
4
votes
3 answers

android fragment action bar menu

I have created a fragment with action bar menu, that menu was shown but not working when its clicked. Here is My Fragment: public class ComposeFragment extends Fragment { @Override public void onCreate(Bundle savedInstanceState) { …