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
4
votes
0 answers

why mostly only onCreateView() is being used in most of fragment examples not onViewCreated()

I already know the difference between onViewCreated() and onCreateView() , so plz don't start explaining me difference between these methods. I started learning about Fragments from CodePath. It all went good but I have few confusions in…
kumar kundan
  • 2,027
  • 1
  • 27
  • 41
4
votes
4 answers

NullPointerException on Fragment Listener

I have a Activity with ViewPager, In ViewPager Adapter I provide Fragment for each position. An example Fragment is DebugFragment. I have written the source code below. public class DebugFragment extends android.support.v4.app.Fragment { private…
4
votes
1 answer

Parent Fragment is alive in Child Fragment but Activity is Null

I have a child fragment in which , parent fragment stays alive but activity context gets null in some random conditions otherwise it works fine, My child fragment code is as follows, package cl.tt.ui.fragments.child; import…
4
votes
2 answers

how to disable background activity from transparent overlay fragment

I have created transparent fragment overlay tutorial on activity and I want to disable touch event of background activity shown below transparent fragment. so user can not touch anything from activity and just use fragment help tutorial. Thank you…
jil123
  • 99
  • 1
  • 12
4
votes
1 answer

How to implement a single FAB across numerous fragments?

I'm interested in implementing a FloatingActionButton or FAB across a number of fragments. When the fragment changes, the FAB's icon should change and the button should obviously then do something pertaining to that specific fragment, however for a…
4
votes
3 answers

Android Google Map - Error inflating class fragment

I am trying to show GoogleMap on my Activity. I have done all necessary steps including key generation, linked google-play-services_lib, added android-support-v4.jar. But I am facing an error because of Fragment. I have tried many solutions, spent…
4
votes
1 answer

Fragment Transaction not working when using AppCompatActivity or FragmentActivity

I have a typical application. An activity which has a FrameLayout and in this layout I want to switch between fragments. This is typically and easily done with: getFragmentManager().beginTransaction() .replace(R.id.ac_container, new…
4
votes
0 answers

Get child view from ExpandableListView in FragmentActivity without childClick Event

I have several classes. First class extends from FragmentActivity, second class is adapter extends from BaseExpandableListAdapter. And Model Class. First class: public class CloseInformationTaskActivityList extends FragmentActivity implements…
4
votes
2 answers

FragmentManager add multiple instances of the same Fragment type

I have the need to "stack up" fragments one on top of another. I do this by: String className = fragment.getClass().getName(); FragmentManager fragmentManager = getChildFragmentManager(); FragmentTransaction fragmentTransaction =…
4
votes
3 answers

Need for popBackStack in onBackPressed

Please help me understand how back stack works natively when "onBackPressed" is called. I noticed that even though visually it went back to the previous fragment, the fragment that was supposedly popped (that I exited from) is still in the back…
SIr Codealot
  • 5,331
  • 9
  • 33
  • 45
4
votes
3 answers

Pass data between two fragments without using activity

I want to pass data between two fragments without using activity and fragment activity. I don't want to pass data between fragments using activity like this : Communicating with Other Fragments Below is my scenario : I have one Parent fragment and…
4
votes
1 answer

Calling Google Play Services GoogleApiClient.connect() from Activity onStart() causes intermittent OpenGL crash (NvRmChannelSubmit errors etc.)

I updated our app to Google Play Services rev 17, this required changing our app's 3D activity from Activity to FragmentActivity. We also now call GoogleApiClient.connect() much earlier than we used to because google recommends calling…
mwk
  • 1,959
  • 1
  • 14
  • 22
4
votes
3 answers

Android keyboard slides down leaving Black screen behind

I am using fragments in my application. There is scrollview in one of fragment containing many views. When user click on edittext, keyboard opens but when user click done button on keyboard then keyboard get hidden leaving black screen. I tried a…
4
votes
3 answers

Android How to find and set the content view in a DialogFragment

I am trying to make a custom Loading Dialog. public class LoadingDialogFragment extends DialogFragment { String title = ""; String message = ""; public LoadingDialogFragment() { } @Override public Dialog onCreateDialog(Bundle savedInstanceState)…
4
votes
3 answers

Android: How to call Fragment class from activity using Intent

I am trying to call a Fragment class from Activity using Intent. Is it possible to implement. Please provide your views.