0

我正在使用Xamarin表單,但我只想爲Android項目製作導航欄後退按鈕。我只是想讓它變大並改變它的顏色。什麼是最好的方法來做到這一點?感謝您的任何答覆或建議。Xamarin android,如何使導航欄後退按鈕變大並改變顏色?

+0

我會建議尋找如何做到這一點本地優先。然後你可以有一個理想的方式來在Xamarin.Forms或者是否存在一個API來做到這一點。你可以直接看看Xamarin.Forms的源代碼,以獲得更多的見解:https://github.com/xamarin/Xamarin.Forms –

+0

自定義Android項目中的Actionbar。 –

回答

0

作爲@Rohit提到你需要一個定製在你的android項目的Resourses文件夾內的values文件夾內的styles.xml中的動作條,James Montemagno做了一篇博文,當他介紹一個cuztom導航欄FormsAppCompatActivity一個例子是這樣的:

<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/

在導航欄高度的問候,可能涉及更多的cuztomization和導航內的自定義視圖酒吧,這裏是一個android例子:

https://guides.codepath.com/android/Using-the-App-ToolBar

相關問題