-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
底部导航栏的选中后,颜色不修改 #53
Comments
那我在这里设置的样式怎么控制呢,按你说的是不是要在新建一个xml文件控制不同图标样式呢
\
…------------------ 原始邮件 ------------------
发件人: "TommyLemon/Android-ZBLibrary" ***@***.***>;
发送时间: 2023年7月16日(星期天) 晚上10:23
***@***.***>;
抄送: "银色 穿甲 ***@***.******@***.***>;
主题: Re: [TommyLemon/Android-ZBLibrary] 底部导航栏的选中后,颜色不修改 (Issue #53)
调整 MainTabActivity 中 getTabSelectIds 对应组件的 背景/颜色 属性
https://github.com/TommyLemon/Android-ZBLibrary/blob/master/app/src/main/java/zblibrary/demo/activity/MainTabActivity.java#L85-L91
https://github.com/TommyLemon/Android-ZBLibrary/blob/master/app/src/main/res/layout/main_tab_activity.xml#L33-L41
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
这样可以。 https://github.com/TommyLemon/Android-ZBLibrary/blob/master/app/src/main/res/values/styles.xml#L37-L39 https://github.com/TommyLemon/Android-ZBLibrary/blob/master/ZBLibrary/src/main/res/color/black_to_white.xml |
我试过了,修改颜色值,依然存在无法渲染选中图标。模拟器上只有触发按下图标,没有改变选中图标。真机也一样。
…------------------ 原始邮件 ------------------
发件人: "TommyLemon/Android-ZBLibrary" ***@***.***>;
发送时间: 2023年7月17日(星期一) 晚上9:51
***@***.***>;
***@***.******@***.***>;
主题: Re: [TommyLemon/Android-ZBLibrary] 底部导航栏的选中后,颜色不修改 (Issue #53)
这样可以,也可以直接把 earth_selector, xx_selector 里面的图标换掉,
bottom_tab_tv 里引用到的 selector 里的颜色值换掉
https://github.com/TommyLemon/Android-ZBLibrary/blob/master/app/src/main/res/values/styles.xml#L37-L39
https://github.com/TommyLemon/Android-ZBLibrary/blob/master/ZBLibrary/src/main/res/color/black_to_white.xml
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
发下界面截屏和改动代码 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
***@***.***/activity_page">
<!-- <RelativeLayout-->
<!-- android:id="@+id/rlBottomTabTopbar"-->
<!-- ***@***.***/topbar_bg">-->
<!-- <TextView-->
<!-- android:id="@+id/topbarTitle"-->
<!-- ***@***.***/topbar_title"-->
<!-- android:layout_centerHorizontal="true"-->
<!-- ***@***.***/home"-->
<!-- tools:ignore="InvalidId" />-->
<!-- </RelativeLayout>-->
<FrameLayout
android:id="@+id/flMainTabFragmentContainer"
***@***.***/match_match"
android:layout_weight="1"></FrameLayout>
<View ***@***.***/divider_horizontal_1px_gray" />
<!-- <include-->
<!-- android:id="@+id/bottomLayout"-->
<!-- ***@***.***/bottom_nav_layout"/>-->
<LinearLayout
***@***.***/ll_horizontal_match_wrap"
***@***.***/topbar_height"
***@***.***/alpha_6" >
<!-- 首页-->
<LinearLayout
android:id="@+id/llBottomTabTab0"
***@***.***/bottom_tab_ll"
android:layout_weight="1">
<ImageView
android:id="@+id/ivBottomTabTab0"
android:layout_width="32dp"
android:layout_height="32dp"
***@***.***/earth_selector" />
<TextView
android:id="@+id/tvBottomTabTab0"
***@***.***/bottom_tab_tv"
***@***.***/home" />
</LinearLayout>
<!-- 功能中心-->
<LinearLayout
android:id="@+id/llBottomTabTab1"
***@***.***/bottom_tab_ll"
android:layout_weight="1">
<ImageView
android:id="@+id/ivBottomTabTab1"
android:layout_width="32dp"
android:layout_height="32dp"
***@***.***/mail_selector" />
<TextView
android:id="@+id/tvBottomTabTab1"
***@***.***/bottom_tab_tv"
***@***.***/able" />
</LinearLayout>
<!-- TODO 修改顺序-->
<!-- 朋友圈-->
<LinearLayout
android:id="@+id/llBottomTabTab4"
***@***.***/bottom_tab_ll"
android:layout_weight="1">
<ImageView
android:id="@+id/ivBottomTabTab4"
android:layout_width="48dp"
android:layout_height="48dp"
***@***.***/add_selector" />
<!-- <TextView-->
<!-- android:id="@+id/tvBottomTabTab4"-->
<!-- ***@***.***/bottom_tab_tv"-->
<!-- android:text="朋友圈" />-->
</LinearLayout>
<!-- 聊天-->
<LinearLayout
android:id="@+id/llBottomTabTab2"
***@***.***/bottom_tab_ll"
android:layout_weight="1">
<ImageView
android:id="@+id/ivBottomTabTab2"
android:layout_width="32dp"
android:layout_height="32dp"
***@***.***/search_selector" />
<TextView
android:id="@+id/tvBottomTabTab2"
***@***.***/bottom_tab_tv"
***@***.***/talk" />
</LinearLayout>
<!-- 个人中心-->
<LinearLayout
android:id="@+id/llBottomTabTab3"
***@***.***/bottom_tab_ll"
android:layout_weight="1">
<ImageView
android:id="@+id/ivBottomTabTab3"
android:layout_width="32dp"
android:layout_height="32dp"
***@***.***/setting_selector" />
<TextView
android:id="@+id/tvBottomTabTab3"
***@***.***/bottom_tab_tv"
***@***.***/personal" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
```
…------------------ 原始邮件 ------------------
发件人: "TommyLemon/Android-ZBLibrary" ***@***.***>;
发送时间: 2023年7月22日(星期六) 下午5:29
***@***.***>;
***@***.******@***.***>;
主题: Re: [TommyLemon/Android-ZBLibrary] 底部导航栏的选中后,颜色不修改 (Issue #53)
发下界面截屏和改动代码
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
环境信息
问题描述
关于下载代码后,启动后的首页底部导航栏选中图标颜色无法改变
错误信息
The text was updated successfully, but these errors were encountered: