我想包括一些解决方案:删除顶栏在Android上xamarin形式
<item name="android:actionBarSize">0dp</item>
或
var activity = (Activity)Forms.Context;
this.Window.AddFlags(WindowManagerFlags.Fullscreen);
或
RequestWindowFeature(WindowFeatures.NoTitle);
或活动串
Theme = "@style/MainTheme.FullScreen"
但我找不到任何可行的解决方案,或者更确切地说,将歌词,电池时间等消除,但我仍然是顶级酒吧,我怎样才能完全删除它?
iOS上我已经添加:
UIApplication.SharedApplication.SetStatusBarHidden(true, true);
和作品......但是Android,他是让我该死:) 解决方案?
我用xamarin形式PCL
我styles.xaml
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<style name="MainTheme" parent="MainTheme.Base">
</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">#2196F3</item>
<!-- colorPrimaryDark is used for the status bar -->
<!--<item name="colorPrimaryDark">#0084CA</item>-->
<!-- colorAccent is used as the default value for colorControlActivated
which is used to tint widgets -->
<item name="colorAccent">#2196F3</item>
<!-- You can also set colorControlNormal, colorControlActivated
colorControlHighlight and colorSwitchThumbNormal. -->
<item name="windowActionModeOverlay">true</item>
<!-- default -->
<item name="android:buttonStyle">@style/NoShadowButton</item>
<item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
</style>
<style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">
<item name="colorAccent">#2196F3</item>
</style>
<style name="NoShadowButton" parent="android:style/Widget.Button">
<item name="android:stateListAnimator">@null</item>
</style>
</resources>
您是否尝试将此项添加到您的活动中? '[Activity(Label =“@ string/app_name”,MainLauncher = true,Theme =“@android:style/Theme.Black.NoTitleBar.Fullscreen”)]' – Krumelur
是的,但不行,顶栏不隐藏 –