开发者

How to create my own preference screen?

Please have a look on the image:

How to create my own preference screen?

There is an item rounded with red color on the right pane. This is a PreferenceScreen item. I need to show another my own view after clicking on this item. See next scre开发者_如何学Cen please:

How to create my own preference screen?


You can make really minimal subclasses of the neccessary Preference classes where you set your own layout via setLayoutResource() in the constructor and bind anything you need to pass in with xml parameters by overriding the onBindView(View) method.

These can then be used inside a PreferenceScreen in xml by using the fully qualified <com.mypackage.mypreference/> tag

If you find yourself making a lot of different views you might want to reconsider, because although settings can reasonably stand some theming. It probably shouldn't get too "widget-y".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜