阿神2017-04-17 16:44:09
When you implement the Tab label yourself, you have to manually change the state of the View when switching so that the View can display the effect of the corresponding state. Have you set that label to selected here?
PHPz2017-04-17 16:44:09
When I made this bottom navigation, I used FragmentTabHost and it felt good.
As for the bubble function, there should be many open source ones
阿神2017-04-17 16:44:09
Selector should be used to select the color change, which means that the selection can be setview
状态为actived
大家讲道理2017-04-17 16:44:09
I set the tab background to a customized itemtrue.xml,
android:background="@drawable/itemtrue"
Then set the state in itemtrue.xml, where state includes state_pressed, state_checked, and state_enabled. You can see what kind of effect you want.
<item
android:drawable="@drawable/darkgreen"
android:state_pressed="true" />
The effect is as follows:
怪我咯2017-04-17 16:44:09
Customize your RadioButton and use canvas to draw your bubbles (shape outlines and numbers) in the onDraw method. The other is to use framelayout as your unit button. The bubble placeholder is hidden and notifications are displayed (different numbers are displayed in conjunction with the cut picture)