Toolbar title is moving when swapping fragments
See original GitHub issueHi!
I have one activity and two fragments. Each fragment has it’s own Toolbar
with different title. When I swap fragments (using transaction.replace
) then the title is moving/jumping. In 2.1.0 it’s a little better. Movement is a lot less visible but it’s still there.
Here is a sample project that reproduces this issue: https://drive.google.com/open?id=0B4aF0Bxe-ecnRjBCaEdIMzMxYVU
It’s not using any custom fonts, wrapping Context
in attachBaseContext
is enough to reproduce this issue.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:20 (5 by maintainers)
Top Results From Across the Web
How change Actionbar title by switching between Fragments
Whenever you switch from one fragment to another fragment you can set the title in ActionBar. This can be done on onCreateView(...) of...
Read more >Fragment | Android Developers
In this case when the user clicks on a title, there is no details container in the current activity, so the titles fragment's...
Read more >Fragments and Action Bars - - Dartmouth
We move away from activities and start to use fragments -- a fragment is now used to render and manager a particular UI...
Read more >Switching ActionBars Across Fragments - YouTube
Today we will be finding a solution to a problem with fragments. Fragments don't have their own actionbar natively, so if you want...
Read more >Non labeled fragment is filled with destination label as toolbar ...
Using fragment navigation graph and Android appbar if you not label your fragment it will lost its empty title state when you navigate....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@chrisjenx @Bombo #327 does seem to fix the “empty” subtitle issue. However, it does not seem to fix the custom font not being applied consistently.
@chrisjenx I think this is due to
toolbar.setSubtitle(BLANK);
inCalligraphyFactory.ToolbarLayoutListener