我Android Navigation bar在我的项目中使用,我想将动作栏中的顶部颜色更改为红色,我该怎么做?我有这样的事情,

我想要这样的东西,

我怎么能实现这一目标?
android background colors android-actionbar navigation-drawer
我正在开发一个应用程序,我需要更改微调器背景布局以匹配背景颜色.我研究并发现我需要创建一个9补丁图像.我已经完成了创建9补丁图像并在应用程序中使用但它看起来比普通微调器更大,而且我也看不到微调器中的下拉按钮.
如果你们从开始为Spinner创建9补丁图像并在应用程序中使用它,我很高兴为我提供了一个明确的教程.

微调器的代码
<Spinner
android:id="@+id/spnIncredientone"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/txtMixtureTitle"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:background="@drawable/spinner_background"
android:prompt="@string/selectmixture" />
Run Code Online (Sandbox Code Playgroud) 如何更改菜单项标题的文本颜色.我试着改变它如下
<style name="Theme.Kanku.ActionBar.TitleTextStyle" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title">
<item name="android:textColor">@color/white</item>
</style>
Run Code Online (Sandbox Code Playgroud)
但它仅更改操作栏标题文本的颜色,而不更改菜单项文本.
有什么方法(如果有办法)自定义菜单(由手机的MENU按钮触发的菜单).我对两件事特别感兴趣:
我正在尝试将标准浅灰色更改为浅绿色.似乎没有一种简单的方法可以做到这一点(例如通过Android主题),但我找到了一个解决方法,如本页所述:http://tinyurl.com/342dgn3.
作者似乎消失了,有人可以帮我整合这段代码吗?我不明白我需要在哪里实现LayoutInflater工厂类.
我正在使用Android工具栏.我只想更改溢出菜单的背景颜色.但它并没有改变.
风格xml
<style name="MyDarkToolbarStyle" parent="Widget.AppCompat.Toolbar">
<item name="popupTheme">@style/PopupMenuStyle</item>
<item name="theme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
</style>
<style name="PopupMenuStyle" parent="android:Widget.Holo.Light.PopupMenu">
<item name="android:popupBackground">@android:color/white</item>
</style>
Run Code Online (Sandbox Code Playgroud)
工具栏XML
<android.support.v7.widget.Toolbar
android:id="@+id/tool_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/ColorPrimary"
android:elevation="2dp"
android:theme="@style/MyDarkToolbarStyle" />
Run Code Online (Sandbox Code Playgroud) 我正在尝试设置我的应用程序的自定义视图,我制作的布局没有填满整个操作栏.我尝试了很多样式设置,但没有一个适合我.
这是我的活动代码
View view = getLayoutInflater().inflate(R.layout.actionbar_customized_home, null);
getSupportActionBar().setDisplayShowCustomEnabled(true);
getSupportActionBar().setCustomView(view);
Run Code Online (Sandbox Code Playgroud)
这里的布局设置为视图
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/actionbar_color"
>
![enter image description here][1]
<ImageView
android:layout_width="wrap_content"
android:layout_height="25dp"
android:layout_centerInParent="true"
android:scaleType="fitCenter"
android:src="@drawable/logo"/>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
甚至像导航器这样的菜单项的背景如何将我的自定义视图作为背景颜色?
我非常感谢你的帮助
android android-styles android-actionbar-compat android-actionbaractivity
我的选项菜单始终显示没有背景(背景是透明的).有谁知道如何摆脱这个?
我发生故障的活动来自另一个自定义活动.
我在eclipse上有这个项目,并且optionsmenu工作正常,但是自从我迁移到AndroidStudio后,选项菜单总是透明的.我试图改变菜单的xml,并以编程方式创建菜单,但背景仍然透明.
android ×8
android-menu ×2
background ×2
menu ×2
colors ×1
nine-patch ×1
popup ×1
toolbar ×1
transparent ×1