fragmentmanager Questions
5
Solved
I'm using navigation in MainActivity, then I start SecondActivity (for result). After finish of SecondActivity I would like to continue with navigation in MainActivity, but FragmentManager has save...
Bioplasm asked 17/8, 2018 at 12:15
4
Solved
Inside a ScrollView I am dynamically switching between two fragments with different heights.
Unfortunately that leads to jumping. One can see it in the following animation:
I am scrolling down un...
Bonkers asked 13/2, 2020 at 22:53
1
I have a ViewPager and a TabLayout containing 3 Fragments. At times when I swipe through(with the help of ViewPager) the 3 Fragments, an IllegalArgumentException is thrown with a message that Fragm...
Heart asked 24/10, 2019 at 21:30
2
I have tried with so many given examples but nothing worked for me. When I am trying to remove a page dynamically from viewPager then I am getting exception:
Cannot setMaxLifecycle for Fragment no...
Otherness asked 6/8, 2019 at 6:34
1
I have an app that works without problems.In this app, I display the products from the server.When you click on one of the products, we enter the details activity to show details.Everything works f...
Asben asked 25/6, 2019 at 9:33
1
Solved
I am trying to remove a fragment but very rarely on Crashlytics I am able to see a bug java.lang.IllegalStateException: Cannot remove Fragment attached to a different FragmentManager.
I have a sep...
Beeman asked 5/4, 2019 at 10:9
0
I've one activity with a viewpager with a custom FragmentAdapter.
Here is my adapter code:
this.viewPager.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager()) {
SparseArray<WeakRe...
Puerility asked 31/3, 2019 at 22:35
2
Solved
For some reason when I try to show a Dialog I get an error from dialog.show(fm, DIALOG_DATE); saying Cannot resolve method 'show(android.support.v4.app.FragmentManager, java.lang.String)'
Why can'...
Eyeglass asked 16/12, 2014 at 21:35
1
Solved
I have an Android application I've been working on, min sdk = 21. In it, I use a custom PreferenceActivity that in turn calls a PreferenceFragment. However, after recently updating to API 28, I not...
Menado asked 16/9, 2018 at 12:59
3
Solved
I sometimes get the following exception when working with Fragments:
FATAL EXCEPTION: main
java.lang.NullPointerException
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:591)
...
Headland asked 15/11, 2012 at 8:18
3
I have an activity with bottom navigation tabs that are changing the fragments in it. When I click back and forth on those tabs, at some point it stops working. Code executes just fine as I put som...
Haehaecceity asked 14/3, 2017 at 20:9
5
Solved
I have created several fragments and I add the first fragment the following way:
mainFragment = (MainFragment) MainFragment.create();
getSupportFragmentManager().beginTransaction()
.setCustomAni...
Giddings asked 15/1, 2014 at 15:45
1
As of SDK 26.0.0-beta1 and above, making use of the getFragments https://developer.android.com/reference/android/support/v4/app/FragmentManager.html#getFragments() method returns a list with only 1...
Graphy asked 19/10, 2017 at 10:20
5
I have method in fragment class. I want to call that method from main activity but I don't want to use FragmentById (or) FragmentByTag.
My fragment method:
public void setItemFromDrawer(String so...
Lipread asked 2/3, 2016 at 12:31
1
java.lang.IllegalStateException: FragmentManager is already executing transactions
I've read all StackOverflow questions about that, and nothing helped.
Just wanted to share my experience
public...
Quietude asked 28/3, 2018 at 8:24
2
Solved
I have created an AppCompatActivity Opened fragment A->B->C->D->E->F
with replace()
I am on F which contain button when I press the
button I want to clear Fragments up to C and Want to open G on ...
Uranalysis asked 22/2, 2018 at 11:37
0
I have a single Activity with fragments and two simple methods inside the activity for managing fragments: pushFragmentImmediate() and popFragmentImmediate().
public void pushFragmentImmediate(Fra...
Empurple asked 8/2, 2018 at 16:59
0
I am adding fragment like bellow :
@OnClick(R.id.lnNews)
void newsList() {
String tagName = returnStatusFragment(getString(R.string.news_list_fragment));
if (!TextUtils.isEmpty(tagName) &&am...
Womanhater asked 1/2, 2018 at 13:28
1
Solved
Years ago, I ran into a problem in one of my apps when I tried to commit a FragmentTransaction inside my onActivityResult() callback. Googling around, I found this question and answer, which say
...
Pris asked 20/11, 2017 at 22:51
0
I have a specific Android native library to integrate the camera features. The library provides the Fragment with the all it features. I just want to integrate that with Mainactivity in React Nativ...
Inextirpable asked 24/11, 2017 at 20:47
1
Solved
I hope someone can help.
I have a non activity class in which I need to access the fragmentmanager in a static method, unfortunatly I don`t know how to pass the context correctly.
Any help is appr...
Merge asked 21/11, 2017 at 17:14
8
Solved
I sometimes see the following stacktrace for a commit that can happen when the user isn't looking at the activity (after state's been saved):
java.lang.IllegalStateException: Can not perform this ...
Kibitka asked 13/2, 2013 at 18:16
3
Solved
In order to reuse some fragments in my app, I need to know which Fragment is the second on the back stack.
In order to do that I'm using getFragmentManager().getFragments(), which shows the follo...
Carmelacarmelia asked 20/9, 2017 at 14:34
3
Solved
I found many post explaining how get the Fragment from the savedInstanceState Bundle but, because the Activity can swap between 4 Fragments, i need a way to know which Fragment was alive before rot...
Disburse asked 20/1, 2017 at 20:10
2
Solved
So, i have notice interesting problem. When i add new fragment programmatically, method onBackStackChanged from OnBackStackChangedListener is called twice, but it must be call only one time. Here i...
Cosher asked 21/3, 2017 at 20:56
© 2022 - 2024 — McMap. All rights reserved.