我想将导航抽屉图标(3个垂直条)的颜色从白色更改为灰色.我怎么用最简单的方式做到这一点?
<?xml version="1.0" enCoding="utf-8"?><androID.support.v7.Widget.Toolbar xmlns:androID="http://schemas.androID.com/apk/res/androID"xmlns:local="http://schemas.androID.com/apk/res-auto"androID:ID="@+ID/toolbar"androID:layout_wIDth="match_parent"androID:layout_height="wrap_content"androID:minHeight="?attr/actionbarSize"androID:background="@color/grey"local:theme="@style/themeOverlay.AppCompat.Dark.Actionbar"local:popuptheme="@style/themeOverlay.AppCompat.light" ><TextVIEw androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:text="Toolbar Title" androID:ID="@+ID/toolbar_Title" androID:textcolor="#010101" /><!--androID:layout_gravity="center"--></androID.support.v7.Widget.Toolbar>
解决方法:
您可以使用以下方式以编程方式更改图标本身:
toolbar.setNavigationIcon(R.drawable.new_icon);
总结 以上是内存溢出为你收集整理的android – 导航抽屉图标改变颜色全部内容,希望文章能够帮你解决android – 导航抽屉图标改变颜色所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)