[英]How can i add some text (i.e. kind of “about” info) in Preferences in Android
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. 我想在我的首选项屏幕(使用xml和PreferenceScreen等创建的)中添加一个简短的文本(2-3个句子),以便为用户提供某种简短的帮助/说明。
I tried using Preference
, ie custom preference, but i cannot see more than 1 line in the title and more than 2 lines in the summary. 我尝试使用Preference
,即自定义首选项,但标题中看不到1行以上,摘要中看不到2行以上。
You can't do a lot of customization to a preference widgets. 您无法对首选项小部件进行大量自定义。
Two options: 两种选择:
1) SMSpopup approach. 1)SMSpopup方法。 Opening a new window with the information. 用信息打开一个新窗口。 Check the About preference. 检查关于首选项。 Check the src code . 检查src代码 。
2) Softkeyboard approach. 2)软键盘方法。 Using the normal preference but setting it disabled. 使用普通首选项,但将其设置为禁用。 Check the src code . 检查src代码 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.