BottomBar
BottomBar copied to clipboard
RequestLayout() improperly called
I've got these warnings whenever the Tab Bar activity is launched.
W/View: requestLayout() improperly called by android.support.v7.widget.AppCompatTextView{2af626cd V.ED.... ......ID 109,111-215,168 #7f0e0075 app:id/bb_bottom_bar_title} during layout: running second layout pass
W/View: requestLayout() improperly called by android.support.v7.widget.AppCompatTextView{1a2f2b82 V.ED.... ......ID 32,120-161,177 #7f0e0075 app:id/bb_bottom_bar_title} during layout: running second layout pass
W/View: requestLayout() improperly called by android.support.v7.widget.AppCompatTextView{2de35293 V.ED.... ......ID 9,120-185,177 #7f0e0075 app:id/bb_bottom_bar_title} during layout: running second layout pass
W/View: requestLayout() improperly called by android.support.v7.widget.AppCompatTextView{3da522d0 V.ED.... ......ID 0,120-194,177 #7f0e0075 app:id/bb_bottom_bar_title} during layout: running second layout pass
W/View: requestLayout() improperly called by android.support.v7.widget.AppCompatTextView{ccb62c9 V.ED.... ......ID 37,120-157,177 #7f0e0075 app:id/bb_bottom_bar_title} during layout: running second layout pass
Any idea on what might be the problem?
I have the same issue, it doesn't seem to be affecting performance in any way but it shows up in the logger. I'm attaching the BottomBar with five items that have Drawables for icons if that helps.
I am also getting these warnings.
I am also getting these, with 5 icons.
Me too
+1
+1 and the textView it's being cut on every click
+1 and text is not showing on Android L
trying to figure this out too... any solution yet? bottom bar title doesnt show appear either.
Yeah I have the same issue.
thumb up! Still in Ver. 2.1.1
i have the same issue with ver. 2.1.1
+1 as mentioned by Firetrap the text may be to blame - the text in my project is getting halved after one click.
+1 the same here with the same scenario. BottomBar with 5 itens all with icons and labels.
+1 on the version 2.1.1
I have the same issue.
Same issue here
is this happening on the latest version? 2.2.0
Confirmed on the latest dev branch, looking into it.
@roughike this is because we trigger a layout phase while on the layout phase, i think what we are missing is that we are not leveraging the measuring phase to calculate the sizes and just lay them out on the payout phase.
Yep. There was no manual requestLayout
method calls that were out of place, so I guess the system calls that for us whenever we update the width / height, paddings, etc. while the onMeasure method hasn't finished.
There's a lot of optimizations to be done through the library. The weird updateTitleBottomPadding()
method for example should be absolutely unnecessary. It was introduced when merging some PR like almost a year ago and to this day, I don't know why it needs to be here at all.
https://github.com/roughike/BottomBar/blob/master/bottom-bar/src/main/java/com/roughike/bottombar/BottomBarBadge.java#L32
I resolved this using android.support.v7.widget.AppCompatTextView:
class BottomBarBadge extends android.support.v7.widget.AppCompatTextView {
@burhanaksendir if that's teh fix, then it will be coming in the next days because that's part of the change i'm working on
Its still bugged, any eta on fix?
when will this bug be fixed? this bug will cause UI stop when app open for long time.
Its been 1 year and no one fixed it, I'd say they don't know how to, or can't. I'll just use a different bottom bar.
@nextdimension @JDDJJ well this library wasn't maintained for a while, And i just started helping about like 2 months ago, but, this is just like a side thing, i'm like 60% done with a huge refactoring in how the BottomBar works, which would make it better while still being backwards compatible. But, i'm super swamped with work this weeks that i haven't been able to finish it. But, don't worry @nextdimension i know how to do it, is already solved, the missing thing is not that is other things before the next release is ready. But, you are always free to use other libraries, or if you want you can contribute Pull Request to improve it as well, i try to take a look to PR as they arrive.
I tried the fix recommended @burhanaksendir but the warnings and the 1-2sec lag on rotation remains
Why do you need this updateTitleBottomPadding ? What if just add to bb_bottom_bar_item_shifting.xml <TextView ..... android:paddingBottom="10dp" ..../>
Fixed in pull request https://github.com/roughike/BottomBar/pull/866
Working fine in my project.