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.

Toolbar title is moving when swapping fragments

See original GitHub issue

Hi!

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:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:20 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
gjsalotcommented, Nov 29, 2016

@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.

1reaction
nikita-toropovcommented, Jul 14, 2016

@chrisjenx I think this is due to toolbar.setSubtitle(BLANK); in CalligraphyFactory.ToolbarLayoutListener

Read more comments on GitHub >

github_iconTop 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 >

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