【问题标题】:Xamarin android, how to make navigation bar back button bigger and change color?Xamarin android,如何使导航栏后退按钮变大并改变颜色?
【发布时间】:2016-08-24 15:48:07
【问题描述】:
我正在使用 Xamarin 表单,但我只想为 android 项目制作导航栏后退按钮。我只是想让它变大并改变它的颜色。最好的方法是什么?感谢您的任何回答或建议。
【问题讨论】:
标签:
xamarin
xamarin.android
xamarin.forms
rendering
navigationbar
【解决方案1】:
正如@Rohit 提到的,您将需要自定义样式中的操作栏自定义导航栏的示例如下:
<style name="AppMainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="colorPrimary">#0063a4</item>
<item name="colorPrimaryDark">#003A63</item>
<item name="colorAccent">#86c447</item>
<item name="android:windowBackground">@color/AppBackgroundColor</item>
<item name="windowActionModeOverlay">true</item>
<item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
</style>
博文在这里:https://blog.xamarin.com/android-tips-hello-toolbar-goodbye-action-bar/
关于导航栏的高度,它可能涉及更多的自定义和导航栏内的自定义视图,这里是一个 android 示例:
https://guides.codepath.com/android/Using-the-App-ToolBar