这是与文本颜色的工具栏的截图为白色的Android工作室应用更改工具栏文本颜色
我是新来的Android很抱歉,如果这是比较简单的。我希望工具栏包含背景图片,如截图所示。不过,我希望工具栏上的文字更清晰可见,例如黑色(#000)。我试图改变主题,但我失去了将图像作为背景的能力。请任何人都可以帮忙。
下面是我的activity_main.xml中
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:popupTheme="@style/AppTheme.PopupOverlay"
android:background="@drawable/yellow_notebook_head"
android:transitionGroup="false"
android:backgroundTintMode="screen"
android:titleTextColor="#000"
/>
</android.support.design.widget.AppBarLayout>
<include layout="@layout/content_main" />
</android.support.design.widget.CoordinatorLayout>
谢谢你,但你的代码去哪里?在activity_main.xml中?你可以添加上下文的代码? – dcraven
在你的活动'onCreate'调用'setContentView(R.layout.your_layout)'后 – rafsanahmad007
你是一个天才!谢谢 – dcraven