Class Info |
|---|
public class HwRspListView extends ListView 该类是华为响应式ListView控件,继承了原生ListView,可以通过设置列数控制折叠屏手机展开态的显示列数。 |
Qualifier and Type |
Attributes Name and Description |
|---|---|
integer |
rspColNum 响应式控件列数设置。 |
boolean |
isRspEnable 使能响应式能力配置。 |
dimension |
rspItemSpace 响应式控件每列元素之间间距设置。 |
Constructor Name |
|---|
public HwRspListView(Context context) 通过代码实例化HwRspListView对象。 |
public HwRspListView(Context context, AttributeSet attrs) 通过XML实例化HwRspListView对象。 |
public HwRspListView(Context context, AttributeSet attrs, int defStyleAttr) 通过XML实例化HwRspListView对象,并应用主题中定义的样式。 |
public HwRspListView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) 通过XML实例化HwRspListView对象,并应用主题中定义的样式。 |
Qualifier and Type |
Method Name and Description |
|---|---|
void |
void setEnable(boolean isEnable) 设置控件特性开关。 |
void |
void setRspItemWidth(int width) 设置展开态每列元素宽度。 |
void |
void setRspColNum(int count) 设置展开态列数。 |
void |
void setRspItemSpace(int space) 设置展开态每列元素间距。 |
void |
void setAdapter(ListAdapter adapter) 设置数据适配器。 |
Methods Inherited from Class android.widget.ListView |
|---|
onScrollStateChanged, onScroll, setAdapter, getAdapter, setSelection, onConfigurationChanged, onSaveInstanceState, onRestoreInstanceState, writeToParcel |
Constructor |
|---|
public HwRspListView(Context context) 通过代码实例化HwRspListView对象。 |
Parameters
Name |
Description |
|---|---|
context |
控件的上下文,通过它可以访问当前主题、资源等。 |
Constructor |
|---|
public HwRspListView(Context context, AttributeSet attrs) 通过XML实例化HwRspListView对象。 |
Parameters
Name |
Description |
|---|---|
context |
控件的上下文,通过它可以访问当前主题、资源等。 |
attrs |
XML中配置的控件属性集合。 |
Constructor |
|---|
public HwRspListView(Context context, AttributeSet attrs, int defStyleAttr) 通过XML实例化HwRspListView对象,并应用主题中定义的样式。 |
Parameters
Name |
Description |
|---|---|
context |
控件的上下文,通过它可以访问当前主题、资源等。 |
attrs |
XML中配置的控件属性集合。 |
defStyleAttr |
当前主题中配置的控件默认样式,为0表示不应用默认样式。 |
Constructor |
|---|
public HwRspListView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) 通过XML实例化HwRspListView对象,并应用主题中定义的样式。 |
Parameters
Name |
Description |
|---|---|
context |
控件的上下文,通过它可以访问当前主题、资源等。 |
attrs |
XML中配置的控件属性集合。 |
defStyleAttr |
当前主题中配置的控件默认样式,为0表示不应用默认样式。 |
defStyleRes |
备用样式 |
Method |
|---|
public void setEnable(boolean isEnable) 设置控件特性开关。 |
Parameters
Name |
Description |
|---|---|
isEnable |
控件特性开关。 |
Method |
|---|
public void setRspItemWidth(int width) 设置展开态每列元素宽度。 |
Parameters
Name |
Description |
|---|---|
width |
展开态每列元素宽度。 |
Method |
|---|
public void setRspColNum(int count) 设置展开态列数。 |
Parameters
Name |
Description |
|---|---|
count |
展开态列数。 |