如何将首选项屏幕隐藏在第二个屏幕后面?

发布于 2024-11-17 15:12:23 字数 196 浏览 4 评论 0原文

我有两个 PreferenceScreen 。 我使用主题 android:theme="@android:style/Theme.Light.WallpaperSettings。 因此,当我加载第二个布局时,第一个布局可以在第二个布局下看到。

我想隐藏第一个首选项屏幕,而不是删除它。我怎样才能做到这一点?

I have two PreferenceScreen .
I use the theme android:theme="@android:style/Theme.Light.WallpaperSettings.
So when I load the second layout, the first layout can be seen under the second layout.

I want to hide the first preference screen, not remove it. How can I do that?

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

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

发布评论

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

评论(1

撞了怀 2024-11-24 15:12:23

如果您有一个 onClick 或其他方法将您发送到第二个首选项屏幕,则在此方法中您可以调用:

 setContentView(.R.drawable.black_image);

要更改后台活动的视图,

也不要忘记在 onResume() 中重置它;

If you have an onClick or other method that sends you to the second preference screen, in this method you could call:

 setContentView(.R.drawable.black_image);

to change the view of the activity in the background

also don't forget to reset it when in your onResume();

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