【发布时间】:2016-10-25 12:00:53
【问题描述】:
我是否有机会在 Xamarin.Forms 中删除应用程序的标题栏?我正在开发一个 Xamarin.Forms 便携式项目。我尝试了很多解决方案,但都没有成功,我什至无法启动应用程序。
第一次尝试我尝试将此添加到我的 AndroidManifest.xml,但没有成功:
android:theme="@android:style/Theme.NoTitleBar"
第二次尝试我尝试在 Resources/values 中创建一个 styles.xml,它是:
<?xml version="1.0" encoding="utf-8" ?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="Theme.Default" parent="@android:style/Theme"></style>
<style name="Theme.NoTitle" parent="@android:style/Theme.NoTitleBar"></style>
<style name="Theme.FullScreen" parent="@android:style/Theme.NoTitleBar.Fullscreen"></style>
</resources>
然后我将它添加到我的 AndroidManifest.xml 中(也不起作用)
android:theme="@style/Theme.NoTitle"
第三次尝试我尝试将此添加到 MainActivity.cs 中的 OnCreate 方法中(没有成功)。
RequestWindowFeature(WindowFeatures.NoTitle);
谁能帮我解决这个问题?
【问题讨论】:
标签: c# android xaml xamarin.forms