Gallery 的 Demo(14)
来源:未知 责任编辑:责任编辑 发表时间:2013-12-18 11:34 点击:次
TextView textView = getGenericView();
textView.setText(getGroup(groupPosition).toString());
return textView;
}
@Override
public boolean hasStableIds() {
return true;
}
@Override
public boolean isChildSelectable(int groupPosition, int childPosition) {
return true;
}
// 获取某一项的 View 的逻辑
private TextView getGenericView() {
AbsListView.LayoutParams lp = new AbsListView.LayoutParams(
ViewGroup.LayoutParams.FILL_PARENT, 48);
TextView textView = new TextView(_ExpandableList.this);
textView.setLayoutParams(lp);
textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT);
textView.setPadding(32, 0, 0, 0);
return textView;
}
}
}
相关新闻>>
- 发表评论
-
- 最新评论 更多>>