带有 TextItems 的 PreferenceActivity
我想使用 PreferenceActivity
进行游戏设置。但我想添加到该列表中,以便在列表中的设置项之后,只有诸如“MyGame,版本 0.1”之类的文本项或可单击的文本项“评价我的应用程序”等。
什么是“正确”或者最直接的方法?我知道我可以指定一个包含 ListView 的自定义布局 xml,并使用首选项填充它,但我也希望在该 ListView 中包含我的自定义(可单击)文本项,或者至少看起来像它们在该列表中一样。
I'd like to use PreferenceActivity
for my games settings. But I'd like to add to that list, so that after the settings items in the list, there would be just text items like "MyGame, version 0.1" or clickable text item "Rate my app" etc.
What's the "correct" or most straighforward way of doing this? I know I can specify a custom layout xml with ListView in it and populate that with the preferences but I'd like to have my custom (clickable) text items in that ListView too, or atleast appear like they were in that list.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我试图告诉的是,我需要这张图片中显示的“服装偏好”[原文如此]:
(来源:kaloer.com)
您可以使用
我从以下位置找到的示例来创建它: http://www.kaloer.com/android-preferences
What I tried to tell was that I needed what is shown as "Costum Preference" [sic] in this picture:
(source: kaloer.com)
You can create it just by using
This example I found from: http://www.kaloer.com/android-preferences
在活动中使用该文件后,要将所有设置放入下面的 XML 文件中,所有设置都会显示在列表中。
To put all setting to below XML file after that file use in the activity all setting are display in list.