setWidgetLayoutResource

来源:互联网 发布:js继承是什么 编辑:程序博客网 时间:2024/05/16 12:38

转载自:http://blog.csdn.net/zzobin/article/details/10116247

如何自定义Preference?

 

初始化可以在构造函数调用的时候进行,调用如下的方法将(1)中所设的布局设置好。

Preference.setWidgetLayoutResource(int widgetLayoutResId)

注意:该方法所添加的自定义preference的布局大小被限定为ListView的条目项的尺寸。

Preference.setLayoutResource (int widgetLayoutResId)

注意:该方法所添加的自定义preference的布局大小不会被限定为ListView的条目项的尺寸,而是使用自定义preference布局自身所需要的尺寸。

 

0 0
原创粉丝点击