【问题标题】:Is there any way to set NoActionBar theme in Application有没有办法在应用程序中设置 NoActionBar 主题
【发布时间】:2020-05-07 02:23:46
【问题描述】:

我正在使用带有 Xamarin 平台的 Visual Studio 制作 android 应用程序。 当我阅读文档时,我发现了。

.

正如我们所见,我们只能创建三个主题。所以我的问题是我们可以将NoActionBar 主题设置为应用程序,就像我们可以在 Android Studio 中设置一样。

感谢任何帮助。

【问题讨论】:

    标签: android xamarin xamarin.android themes


    【解决方案1】:

    您可以在应用中使用没有操作栏的主题。例如,您可以在Properties\AssemblyInfo.cs 中指定应用程序属性:

    [assembly: Application(Icon = "@drawable/Icon" Theme = "@android:Theme.Holo.Light.NoActionBar")]
    

    或者在AndroidManifaset.xml中设置

    <application android:theme="@android:style/Theme.Holo.Light.NoActionBar" />
    

    如果这不起作用,请创建一个没有操作栏的样式,就像这里提到的那样:https://stackoverflow.com/a/14061826/85606

    【讨论】:

    • 我们可以像在 Android Studio 中设置的那样设置Theme.AppCompat.Dark.NoActionBar
    • 感谢您的回答。
    【解决方案2】:

    没有带有样式的操作栏

    <style name="NoActionBar" parent="@android:style/Theme.Holo.Light.NoActionBar">
    
     </style>
    

    【讨论】:

      猜你喜欢
      • 2011-02-09
      • 1970-01-01
      • 1970-01-01
      • 2013-07-04
      • 1970-01-01
      • 2010-09-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多