BottomBar icon indicating copy to clipboard operation
BottomBar copied to clipboard

Non-highlighted title text is cut off

Open kevinschlieper opened this issue 10 years ago • 15 comments

Hi,

I have noticed that the bottom part of the title text is cut off. However, for some reason that doesn't seem to be a problem for the first tab, but only for the 2nd and 3rd (only tested with 3 tabs). You can see the problem in the sample app as well.

Steps to reproduce:

  1. Start BottomBar sample app.
  2. Choose "SIMPLE EXAMPLE WITH THREE TABS"
  3. Observe the 2nd tab

Actual behavior: The "y" is cut off (but only in the non-highlighted state).

Expected behavior: Text shouldn't be cut off.

bottombar text cut off

Let me know if you need more input.

Kevin

kevinschlieper avatar Aug 24 '16 15:08 kevinschlieper

I have same bug, and the cut off value is random.

smoothdvd avatar Aug 25 '16 06:08 smoothdvd

Hi, I'm having the same bug too. I have 4 tabs. The 3rd tab title is "History", and 'y' is cut off when non-highlighted.

flukeylukey avatar Aug 25 '16 10:08 flukeylukey

image

oooooh, My title was hidden too :(

MilesGoon avatar Aug 26 '16 01:08 MilesGoon

It was related to the updateTitlePadding() method that was merged from someone else's PR.

The fix will be released with the version 2.0.3.

roughike avatar Aug 29 '16 18:08 roughike

@roughike Thanks

smoothdvd avatar Aug 29 '16 23:08 smoothdvd

I fixed it with this style: <style name="BB_BottomBarItem_TitleStyle"> <item name="android:maxLines">1</item> <item name="android:height">24dp</item> <item name="android:gravity">center_horizontal</item> </style>

Ovadia-B avatar Sep 12 '16 08:09 Ovadia-B

@Ovadia-B where should i apply this style? for me it doesn't work :(

yuriChechetkin avatar Oct 26 '16 02:10 yuriChechetkin

I am facing the same problem but only after I call DialogFragement from Fragment on a tab

rudakovsky avatar Oct 26 '16 14:10 rudakovsky

@yuriChechetkin Just copy & paste those lines in your styles.xml file, it will override the style from the library.

Ovadia-B avatar Oct 31 '16 11:10 Ovadia-B

Same for me, but applying style doesn't work. When do you plan to release 2.0.3 version?

tomaszczura avatar Oct 31 '16 13:10 tomaszczura

Will keep an eye on this thread and await 2.0.3 for a permanent fix however for the interim, @Ovadia-B your fix did the trick for me for now! thanks very much!

Great work @roughike, keep it up!!

daveak01 avatar Nov 08 '16 23:11 daveak01

@Ovadia-B Thanks, that worked for me.

mkmckenna avatar Nov 09 '16 11:11 mkmckenna

For guys who have issues with temporary workaround by @Ovadia-B, you can also add android:includeFontPadding with false value into the style above, it did the trick for me.

dmitriialeksandrov avatar Nov 10 '16 12:11 dmitriialeksandrov

Google released new API in support library v25 with BottomNavigationView.

New APIs

android.support.design.widget.BottomNavigationView class implements the bottom navigation pattern from the Material Design spec.

Ovadia-B avatar Nov 16 '16 15:11 Ovadia-B

Thanks @dmitriialeksandrov, that helped -- it reduced the amount of text cut off, but didn't get rid of it completely. It also turned out that my icons were not 24dp. Once I fixed that, the text was no longer cut off!

huttarl avatar Dec 08 '16 03:12 huttarl