我如何在 Android 的首选项中添加一些文本(即“关于”信息)
我想在我的首选项屏幕(使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法对首选项小部件进行大量自定义。
两种选择:
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.