本文整理了Java中android.widget.ExpandableListView.setChoiceMode()
方法的一些代码示例,展示了ExpandableListView.setChoiceMode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ExpandableListView.setChoiceMode()
方法的具体详情如下:
包路径:android.widget.ExpandableListView
类名称:ExpandableListView
方法名:setChoiceMode
暂无
代码示例来源:origin: stackoverflow.com
lv = (ExpandableListView) getActivity().findViewById(R.id.explist);
lv.setItemsCanFocus(false);
lv.setChoiceMode(ExpandableListView.CHOICE_MODE_SINGLE);
代码示例来源:origin: gigabytedevelopers/FireFiles
@Override
public View onCreateView(
LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final View view = inflater.inflate(R.layout.fragment_roots, container, false);
mList = (ExpandableListView) view.findViewById(android.R.id.list);
mList.setOnChildClickListener(mItemListener);
mList.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
DisplayMetrics metrics = new DisplayMetrics();
getActivity().getWindowManager().getDefaultDisplay().getMetrics(metrics);
int width = Utils.dpToPx(302);
boolean rtl = Utils.isRTL();
int leftPadding = rtl ? 10 : 50;
int rightPadding = rtl ? 50 : 10;
int leftWidth = width - Utils.dpToPx(leftPadding);
int rightWidth = width - Utils.dpToPx(rightPadding);
if(Utils.hasJellyBeanMR2()){
mList.setIndicatorBoundsRelative(leftWidth, rightWidth);
} else {
mList.setIndicatorBounds(leftWidth, rightWidth);
}
return view;
}
代码示例来源:origin: stackoverflow.com
list.setChoiceMode(AbsListView.CHOICE_MODE_MULTIPLE);
list.setOnChildClickListener(this);
list.setOnGroupClickListener(this);
内容来源于网络,如有侵权,请联系作者删除!