如何将首选项放入视图中?
我需要制作一个带有页眉(将包含 ImageView 和 TextView)和页脚(导航菜单,将由 ImageView 组成)的屏幕,在其之间,我需要具有首选项屏幕,其中包含所有默认操作(如滚动和设置首选项)。
我应该采取哪种方法来实现这一目标?
现在,我已经在中间创建了一个带有 FrameLayout 的视图,我可以在其中放置我想要的视图。但我怎样才能在其中放入 PreferenceActivity 呢?
I need to make a Screen with Header(Will contain ImageView and TextView) and Footer(Navigation Menu, will consists of ImageView), in the between I need to have Preference screen with all the default action like scrolling and setting preferences.
Which approach should I take to achieve this?
Right now, I have made a View with FrameLayout in the middle where I can put the View I want in it. But how can I put a PreferenceActivity in it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
PreferenceActivity 是获取通用首选项屏幕的自动化方法。如果您需要额外的 UI 元素,则必须手动实现。这将花费更多时间,但并不太难,您可以按照自己想要的方式设计它。
PreferenceActivity is automated way to get generic preference screen. If you need extra UI elements, you have to implement it manually. It will take more time, but isn't too hard and you can design it any way you want.