gpt4 book ai didi

java - Android,没有 AppCompat,全屏 - 最正确的风格?

转载 作者:行者123 更新时间:2023-11-30 00:52:15 26 4
gpt4 key购买 nike

Android 应用程序,仅限 21 级以上。 使用 AppCompat。

绝对没有栏的全屏应用。

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.client.client">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"

android:theme="@style/AppTheme">

<activity android:name=".Main"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen">

<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

我很困惑:

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

相对于...

android:theme="@android:style/Theme.DeviceDefault.NoActionBar.Fullscreen"

最好和最现代的选择是什么?

我不了解 Android 中这些值与类似值之间差异的完整历史:/

同样,不要使用 AppCompat,如果这很重要的话。

这是我希望该应用在所有设备上的显示方式的屏幕截图:

enter image description here

最佳答案

what is the best and most modern choice?

如果 minSdkVersion 为 21+,您可以使用基于 Theme.Material 的主题,例如 Theme.Material.Light.NoActionBar.Fullscreen.

关于java - Android,没有 AppCompat,全屏 - 最正确的风格?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40819963/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com