我如何在 Android 的首选项中添加一些文本(即“关于”信息)

发布于 2024-10-08 17:19:26 字数 162 浏览 0 评论 0原文

我想在我的首选项屏幕(使用 xml 和 PreferenceScreen 等创建)中添加一个简短的文本(2-3 句话),以便为用户提供某种简短的帮助/描述。

我尝试使用 Preference,即自定义首选项,但我在标题中看不到超过 1 行,在摘要中看不到超过 2 行。

I'd like to add a short text (2-3 sentences) to my preferences screen (which is created using xml with PreferenceScreen, etc), in order to provide some kind of short help/description for the user.

I tried using Preference, i.e. custom preference, but i cannot see more than 1 line in the title and more than 2 lines in the summary.

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

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

发布评论

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

评论(1

世俗缘 2024-10-15 17:19:26

您无法对首选项小部件进行大量自定义。

两种选择:

1)SMSpopup 方法。打开一个包含信息的新窗口。检查“关于”首选项。
检查 src代码

2)软键盘方法。使用正常首选项但将其设置为禁用。检查src 代码< /a>.

You can't do a lot of customization to a preference widgets.

Two options:

1) SMSpopup approach. Opening a new window with the information. Check the About preference.
Check the src code.

2) Softkeyboard approach. Using the normal preference but setting it disabled. Check the src code.

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