【发布时间】:2018-03-02 17:21:41
【问题描述】:
我什至用 Google 都找不到如何将 Android 项目设置为 Light Theme。
“虚线”按钮后面的工具栏一直是黑色的,我该如何让它变白?
我的意思是当你按下右上角的“虚线”按钮时弹出的导航。
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<color name="ListViewSelected">#ff9933</color>
<color name="ListViewHighlighted">#E39696</color>
<style name="MainTheme" parent="MainTheme.Base">
<item name="android:colorPressedHighlight">@color/ListViewSelected</item>
<item name="android:colorLongPressedHighlight">@color/ListViewHighlighted</item>
<item name="android:colorFocusedHighlight">@color/ListViewSelected</item>
<item name="android:colorActivatedHighlight">@color/ListViewSelected</item>
<item name="android:activatedBackgroundIndicator">@color/ListViewSelected</item>
</style>
<!-- Base theme applied no matter what API -->
<style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
<item name="windowNoTitle">true</item>
<!--We will be using the toolbar so no need to show ActionBar-->
<item name="windowActionBar">false</item>
<!-- Set theme colors from http://www.google.com/design/spec/style/color.html#color-color-palette -->
<!-- colorPrimary is used for the default action bar background -->
<item name="colorPrimary">#ff9933</item>
<!-- colorPrimaryDark is used for the status bar -->
<item name="colorPrimaryDark">#ff9933</item>
<!-- colorAccent is used as the default value for colorControlActivated
which is used to tint widgets -->
<item name="colorAccent">#ff9933</item>
<!-- You can also set colorControlNormal, colorControlActivated
colorControlHighlight and colorSwitchThumbNormal. -->
<item name="windowActionModeOverlay">true</item>
<item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
</style>
<style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">
<item name="colorAccent">#ff9933</item>
</style>
</resources>
【问题讨论】:
标签: c# xaml xamarin.forms styles themes