fragmentmanager Questions

2

Solved

As reported by the Android guide, dual-pane can be achieved in two ways: Multiple fragments, one activity Multiple fragments, multiple activities I am using the first case (the Android guide on...
Lethbridge asked 21/8, 2014 at 15:31

2

Solved

I've looked at all the questions on Stackoverflow but could not find a single definitive answer to this question. How do you set a Tag to a Fragment so that you can retrieve it via getFragmentManag...
Rosina asked 5/5, 2015 at 19:57

2

I have an activity in which I am switching fragments using following method: public void setCurrentFragment(Fragment fragment) { FragmentTransaction transaction = getSupportFragmentManager().begi...
Anserine asked 30/1, 2014 at 8:13

2

I have an application page with viewpager containing two fragments. When my activity pops up , a server request is made for loading current data and then adapter is set. But the app crashes with th...
Legitimacy asked 23/12, 2014 at 11:8

1

I am using https://github.com/derekbrameyer/android-betterpickers to use time- and date pickers for my app. However, my app does not need a support library and it seems like I need SupportFragmentM...

1

I have [main]Fragment with two ViewPagers in it. Each ViewPager contains several Fragments in it. ViewPager's Fragments obtain data into their ListViews from [main]Fragment. I need to update data i...

3

Solved

I'm using the following code to create a fragment everytime the user click on an item in a list view. But in this way the fragment is created at every user click. What I want is to reuse the old fr...
Umbilicus asked 29/8, 2014 at 11:34

3

Solved

I have an 'Activity A' which host a 'Fragment B'. Please confirm that if I call A.finish() then 'fragment B 'gets destroyed. The fragment B would already be added to the fragment manager. I realize...
Gentile asked 20/8, 2014 at 20:36

2

Solved

I have a Main activity that extends from FragmentActivity, like this: public class Main extends FragmentActivity{ public static FragmentManager fragmentManager; public static CustomFragmentAdapter...

0

After a while searching the reason of my NPE, i noticed that despite FragmentTransaction.remove(Fragment) reallys removes the Fragment, the size of the List returned by FragmentManager.getFragments...

1

Solved

At present I have got a "RELATIVE_LAYOUT" container which I am using for adding my fragment. I am using OnClickListener on a button to load the fragment XML layout into the RelativeLayout container...

0

Background: I have a main Activity, it wraps a main Fragment that can be changed, and in order to keep a backstack I use FragmentManager's backstack. The main difference from keeping an activity ...
Interfluent asked 23/6, 2014 at 11:10

1

How do I properly use Fragments in Fragments? My (simplified) use case is following, I have an activity with a layout fragment and this fragment theirself contains a sub fragment... all fragments ...
Repulsive asked 19/12, 2013 at 8:28

1

Solved

I am destroying a programmatically created fragment with: getFragmentManager().beginTransaction().remove(getFragmentManager().findFragmentById(R.id.test)).commit(); Which is determined in the xm...
Netherlands asked 18/12, 2013 at 17:1

2

Solved

How can I show this : public class TagsDialog extends DialogFragment { @Override public Dialog onCreateDialog(Bundle savedInstanceState) { AlertDialog.Builder builder = new AlertDialog.Builder...

1

Solved

I have an activity with 3 fragments; a header; a body; a footer (same point as in HTML). The bodyfragment contains three buttons which each should replace the middle fragment (body; itself) with an...
Accommodation asked 5/12, 2013 at 13:18

2

Solved

I have this odd problem that my fragments are not calling any of the end lifecycle methods like onPause and onStop when I replace it with another fragment. I replace the fragment like this public ...
Flinger asked 2/10, 2013 at 8:42

1

I'm experiencing strange, perhaps version-specific behavior with my DialogFragment subclass when testing the following steps: (1) Open the dialog (2) Leave the app with either the Home key or the ...

1

Solved

I have a simple Fragment with a ViewPager. I'm using the up to date support library, v4 rev18! If I show the sub fragment the first time, everything works fine, if I go back and show it again, th...

1

Solved

Good morning. I'm developing an app in which I have a main layout that extends from activity and inside this one I have one fragment of one data type, in my case FragmentCover (it's a class). Duri...

© 2022 - 2024 — McMap. All rights reserved.