Android Theme 主题使用心得

发布于 2024-05-30 10:01:54 字数 1030 浏览 30 评论 0

透明 Activity 主题:

android:theme="@style/Theme.Translucent"
<!-- A theme that has a translucent background. Here we explicitly specify
that this theme is to inherit from the system's translucent theme,
which sets up various attributes correctly. -->
<style name="Theme.Translucent" parent="android:style/Theme.Translucent">
<item name="android:windowBackground">@drawable/translucent_background</item>
<item name="android:windowNoTitle">true</item>
<item name="android:colorForeground">#fff</item>
</style>

3D 界面(GLSurfaceView 层)并把系统背景透过来显示:

android:theme="@style/Theme.CustomBackground_wallpager"
<style name="Theme.CustomBackground_wallpager" parent="@android:style/Theme.Wallpaper">
<item name="android:windowNoTitle">true</item>
<!-- 没标题 -->
<item name="android:windowFullscreen">true</item>
<!-- 全屏显示 -->
</style>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

关于作者

乖不如嘢

暂无简介

文章
评论
28 人气
更多

推荐作者

櫻之舞

文章 0 评论 0

弥枳

文章 0 评论 0

m2429

文章 0 评论 0

野却迷人

文章 0 评论 0

我怀念的。

文章 0 评论 0

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文