FragmentManager is an interface for interacting with Fragment objects inside an Activity in Android. While the FragmentManager API was introduced in HONEYCOMB, a version of the API at is also available for use on older platforms through FragmentActivity. For more information about using fragments, read the Fragments developer guide.
Questions tagged [fragmentmanager]
700 questions
0
votes
0 answers
shows "fragmentManager cannot be resolved" , working through Android 4.0 Tutorial 12
Everything else is good except the "fragmentManager" cannot be resolved, what am I doing wrong here? The tutorial skipped over some parts on this section...
@Override
public void onCreate(Bundle savedInstanceState)
{
…
0
votes
2 answers
Android Viewpager how can learn ViewPager.getCurrentItem from fragment
Well I'm using viewpager. I am creating views with this:
public class CrimePagerActivity extends FragmentActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FragmentManager fm…

mehmet
- 1,558
- 5
- 30
- 41
0
votes
1 answer
CalendarDatePickerDialog on Activity without support package
I'm using CalendarDatePickerDialog from BetterPickers in my project,
if i use a FragmentActivity, then i can use the getSupportFragmentManager().
The problem is that i'm trying to add CWAC-Camera as well,
but for that i need to…

Shahar
- 3,692
- 4
- 25
- 47
0
votes
1 answer
Android - FragmentManager
I am trying to make a little program which allows user to add items into a shopping list. The problem is that the program starts and closes immediately after a short while with the message: "Unfortunately, shopping has stopped" Shopping is the name…

user3267129
- 3
- 3
0
votes
1 answer
Replace fragment in viewpager is not working
In my project i am using actionbar with swipeable threefragments(tabs with viewpager), i am trying to replace one of the fragment with fourth fragment, but iam not able to get it..
**Below is my code**
public class GetRideFragment extends…

teekib
- 2,821
- 10
- 39
- 75
0
votes
1 answer
Getting Null Pointer Exception when starting an AsyncTask although it would seem that the onCreate holds all the variables
I am having an issue with a Fragment and an AsyncTask. The issue is that I am creating a Fragment to run an AsyncTask to run a timer. The code works independently of all my other code and I have tested it numerous times. The issue is that when I…

cchinchoy
- 51
- 2
- 12
0
votes
0 answers
Calling Fragment's Method from a Non-Fragmented Class
I am trying to call methodToBeCalled() from my UnrelatedClass. I am new to fragments, and 5 days later, still cannot figure it out. I would greatly appreciate any detailed help! If I did not include necessary code, please let me know and I will…

Evorlor
- 7,263
- 17
- 70
- 141
0
votes
1 answer
navigation within Fragment page
In Home.java activity extends Fragment and I take custom Listview with two buttons.So I want to move next activity when button is clicked. I use Fragement and FragmentMangar code. But It does not work.It is giving error of NullpointerException.I…

user2893626
- 3
- 1
- 4
0
votes
1 answer
getSupportFragmentManager().findFragmentByTag unpredictable behaviour
If I'm adding fragments to my activity like this:
fragment_tags = new ArrayList();
fragment_tags.add("user_fragment");
fragment_tags.add("memorial_fragment");
UserFragment user = new UserFragment();
MemorialFragment…

vanomart
- 1,739
- 1
- 18
- 39
0
votes
1 answer
Dialogbox gives error on .show() in android gingerbread version
I have to implement multiple select dialog box for gingerbread version.
My main Activity called EventCreateActivity extends class called BaseActivity and that extends SherlockActivity.
main activity
public class EventCreateActivity extends…

cham
- 43
- 11
0
votes
1 answer
Recursive entry to executePendingTransaction
In brief i have such construction:
class AlbumPickerFragment extends PageFragment {
...
@Override
public void onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
…

Semyon Danilov
- 1,753
- 1
- 17
- 37
0
votes
2 answers
Using a Fragment Layout
My Android app has a requirement where a certain flow has 7 different screens. Now each of these screens has a common top and bottom. So i have chosen to create a FragmentActivity and 7 different Fragments. How do I insert the fragments into the…

user1730789
- 5,157
- 8
- 36
- 57
-1
votes
2 answers
can not resolve method add for Fragment Transaction - Android
I was just upgrading old android project and stuck at below code :
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
transaction.add(R.id.instructional_tutorial_video_youtube_view, youTubePlayerFragment).commit();
…

Jaimin Modi
- 1,530
- 4
- 20
- 72
-1
votes
1 answer
ViewPager2 Error Fragment Manager is already executing
I am trying to fix a bug where my app crashes if a user performs an orientation change during the onboarding process (I used a 3 fragment viewpager2 layout within JetPack NavHost). I tried adding my viewmodel to it so that it would be lifecycle…

CoolHands
- 25
- 7
-1
votes
1 answer
How to call class by its name dynamically in Kotlin
Assume I have a fragment called "LoginFragment". I want to use this fragment in add transaction below:
fTransaction.add(R.id.login_fragment, LoginFragment())
But I need call it by name dynamically like this:
val name =…

weera
- 884
- 1
- 10
- 21