question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect display after replacing fragment

See original GitHub issue

Hello, There is a display error when the fabOptions is rebuilt into a new fragment, let me explain :

  • Everything is fine when it is in the first display of the fragment. capture d ecran de 2017-07-07 10-47-51
  • But there is a problem displaying the icons when I replace by the same fragment : DetailsBuddyFragment details = new DetailsBuddyFragment(); getSupportFragmentManager().beginTransaction().replace(R.id.fragment_details_buddy, details, TAG_DETAILS_FRAGMENT).commit(); capture d ecran de 2017-07-07 10-56-24 The icons are here but hidden. (We see a small clickable part on the right) I tested for an API 19 and by xml and programmatically.

When I do both at the same time :

  • First add fragment capture d ecran de 2017-07-07 11-02-32
  • After replace capture d ecran de 2017-07-07 11-02-41

Can you solve the problem ? Thx

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
J-Jametcommented, Jul 10, 2017

So I have completely change my code and I no longer use your library. 😕 I think the bug comes from CoordinatorLayout and CollapsingToolbarLayout behind the fragment who contains FabOptions view but I’m not sure. You can close the issue if you want, but I may add some functionality to your library later. Have a nice day

0reactions
JoaquimLeycommented, Jul 11, 2017

I know maybe it’s too little too late, but you could’ve reset your buttons when the Activity is recreated, I’m thinking about doing another release and I’ll probably expose #35 the open() and close() methods, that might help to better handle the view.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Wrong replaced fragment view after screen orietation change
1 Answer 1 ... One solution is to keep the current tag or fragment as a static variable. Otherwise, do you want to...
Read more >
onStart on new Fragment is called before onStop on previous ...
When changing fragments (support.v4 ones) the lifecycle is incorrect. Sample project has two fragments: FragmentA and FragmentB.
Read more >
Fragment - Android Developers
FragmentStrictMode added a new WrongNestedHierarchyViolation that detects when a child fragment is nested within it's parent's View hierarchy, but not added ...
Read more >
Creating and Using Fragments | CodePath Android Cliffnotes
onActivityCreated() is called when host activity has completed its onCreate() method. onStart() is called once the fragment is ready to be displayed on...
Read more >
Android Fragments Common Queries & Common Mistakes
When to use FragmentTransaction add vs replace ? ... In our Activity we have a container and inside this container we display our...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found