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
3 answers

Android - Viewpager and fragments, methods not working

I have a ViewPager with two Fragments which I instantiate in onCreate of my FragmentActivity. private List fragments = new…
6
votes
2 answers

Starting FragmentActivity from Activity with Intent

I'm getting a force close every time I try to start a FragmentActivity from an Activity using an Intent. Here's the code from the Activity: Intent intent = new Intent(getApplicationContext(), OrgHome.class); intent.putExtra("Username",…
Connor Black
  • 6,921
  • 12
  • 39
  • 70
6
votes
1 answer

how to disable ViewPager swiping using android-support-v4.jar in android

I'm creating a android application with target on 2.2. I still want to use the ViewPager provided in the android.support-v4.jar.i want need to disable Viewpager swipping on button click.i have use following code for disable. but its don't…
Akash Singh
  • 5,171
  • 2
  • 26
  • 55
6
votes
1 answer

Using FragmentManager and FragmentTransaction in a DialogFragment

The gist of the issue is this: I'm trying to Launch a DialogFragment from a FragmentActivity. This DialogFragment's view contains a FrameLayout which I would like to populate with a Fragment. Basically the FragmentActivity launches the…
5
votes
0 answers

I got a super weird crash on Fabric onResume of my FragmentActivity, at the super.onResume()

What does this mean, and can be fixed somehow? Not crashing in my code, but in the super of the FragmentActivity, I can't figure out what I am doing wrong: Fatal Exception: java.lang.IllegalArgumentException at…
5
votes
1 answer

DateTime picker FragmentManager exception

I've integrated the following library from GitHub into my project: https://github.com/jjobes/SlideDateTimePicker It has been integrated fine but does not work when executed. I have created the following FragmetActivity which simply has a button that…
turtleboy
  • 8,210
  • 27
  • 100
  • 199
5
votes
1 answer

Error of Glide library: You cannot start a load from a destroyed Activity

I'm using Recycle Adapter class and using this to populate the fragments with blog image and description. But when I close the BlogActivity and move to Next Activity then sometimes suddenly app get crashed with error…
5
votes
2 answers

ViewPager with TabLayout issue with AnimatedVectorDrawable

I'm trying to implement simple ViewPager with some animations on VectorDrawable. Following this very good example solution for nice tab scrolling with dot's switching. The only difference is that I'm using vector animations. As an activity it works…
5
votes
0 answers

fragment's isAdded method returns false and isAttached returns true

I call a method in an activity when I am on one of the fragments and then return result of method in activity on the same fragment I am in but surprisingly is gives me error saying fragment is not added yet. I print isAttached and isDetached method…
Aalap Patel
  • 2,058
  • 2
  • 17
  • 31
5
votes
2 answers

Detect user inactivity in DialogFragment and logout after some time

There are many activities and dialog fragments in my app. I searched about detecting activity and came to know about onUserInterAction function but it detects in activity for activities only but not while a dialog fragment is open.
5
votes
9 answers

getSupportFragmentManager() undefined in adapter when using AppCompatActivity

I have an activity (MainActivity) which extends AppCompatActivity because I am using some of the material design elements in my app. I then have an array adapter with a few fields and a button. This adapter has a separate view and is injected into…
5
votes
0 answers

General guidelines for calling getActivity() inside DialogFragment class

As mentioned here: "be careful to call getActivity() only when the fragment is attached to an activity. When the fragment is not yet attached, or was detached during the end of its lifecycle, getActivity() will return null." I have a couple of…
5
votes
2 answers

How to lock CollapsingToolbarLayout from Android support library

I am using Activity class with (usually) one fragment as a content. In the Activity I use CollapsingToolbarLayout as some kind of header for some information and everything works fine. But in some cases (when some fragments are attached) I don't…
5
votes
2 answers

Adding toolbar to a FragmentActivity

Am extending a FragmentActivity in a class which serves as my base activity where my other activities extend from. My issue is when I extend my other activities from my base activity, I loose toolbar functionality. How can I add this to my base…
codeFreak
  • 353
  • 1
  • 3
  • 15
5
votes
2 answers

How to make fragment honor soft input mode of activity

I have an activity configured as follows in the manifest: android:windowSoftInputMode="stateHidden|adjustPan" This activity creates a fragment. The fragment configures itself to be full-screen in onCreate(),…