安卓背景可以改成黑色吗?

发布于 2025-01-08 07:17:29 字数 69 浏览 1 评论 0原文

在 Activity 之间切换时是否可以更改背景颜色? 我的意思是当其中一项活动消失且在第二项活动出现之前出现的黑色。谢谢。

Is it possible to change the colour of background while switching between activities?
I mean the black colour what apear while one of activities disappear and before second appear. Thanks.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

仅一夜美梦 2025-01-15 07:17:29

只需转到 activity_home.xml
在代码的起始行添加此背景参数以将屏幕设置为黑色

android:background="#ffffff"

Just you need to head over to the activity_home.xml
At the starting lines of code add this background parameter to set the screen black

android:background="#ffffff"
ぃ双果 2025-01-15 07:17:29

您可以按如下方式更改您正在使用的主题:

application android:icon="@drawable/icon" android:label="@string/app_name"
    android:theme="@android:style/Theme.Light" >

编辑
如文档中所述:

<application android:theme="@style/CustomTheme">

然后调整您喜欢的主题:

<style>
<color name="custom_theme_color">#b0b0ff</color>
<style name="CustomTheme" parent="android:Theme.Light">
<item name="android:windowBackground">@color/custom_theme_color</item>
<item name="android:colorBackground">@color/custom_theme_color</item>
</style>

这是主题的链接 http://developer.android.com/guide/topics/ui/themes.html#ApplyATheme

you may change the theme that you are using as follows:

application android:icon="@drawable/icon" android:label="@string/app_name"
    android:theme="@android:style/Theme.Light" >

Edit
as mentioned in the documentation:

<application android:theme="@style/CustomTheme">

and then tweak the theme that you like:

<style>
<color name="custom_theme_color">#b0b0ff</color>
<style name="CustomTheme" parent="android:Theme.Light">
<item name="android:windowBackground">@color/custom_theme_color</item>
<item name="android:colorBackground">@color/custom_theme_color</item>
</style>

here is the link to the topic http://developer.android.com/guide/topics/ui/themes.html#ApplyATheme

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