Please have a look on the image:
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:
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".
精彩评论