本文整理了Java中android.widget.ExpandableListView.setItemChecked()
方法的一些代码示例,展示了ExpandableListView.setItemChecked()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ExpandableListView.setItemChecked()
方法的具体详情如下:
包路径:android.widget.ExpandableListView
类名称:ExpandableListView
方法名:setItemChecked
暂无
代码示例来源:origin: stackoverflow.com
@Override
public boolean onChildClick(ExpandableListView parent, View v,
int groupPosition, int childPosition, long id) {
...
int index = parent.getFlatListPosition(ExpandableListView.getPackedPositionForChild(groupPosition, childPosition));
parent.setItemChecked(index, true);
return true;
}
代码示例来源:origin: stackoverflow.com
@Override
public boolean onChildClick(ExpandableListView parent, View v,
int groupPosition, int childPosition, long id) {
...
int index = parent.getFlatListPosition(ExpandableListView.getPackedPositionForChild(groupPosition, childPosition));
parent.setItemChecked(index, true);
return true;
}
代码示例来源:origin: stackoverflow.com
@Override
public boolean onChildClick(ExpandableListView parent, View v,
int groupPosition, int childPosition, long id) {
...
int index = parent.getFlatListPosition(ExpandableListView.getPackedPositionForChild(groupPosition, childPosition));
parent.setItemChecked(index, true);
return true;
}
代码示例来源:origin: stackoverflow.com
parent.setItemChecked(index, true);
代码示例来源:origin: stackoverflow.com
listView.setItemChecked(position, checkedState[groupPosition][childPosition]);
((CheckableLinearLayout)v).toggle();
checkedState[groupPosition][childPosition] = !checkedState[groupPosition][childPosition];
listView.setItemChecked(position, ((CheckableLinearLayout)v).isChecked());
代码示例来源:origin: gigabytedevelopers/FireFiles
@Override
public boolean onChildClick(ExpandableListView parent, View v, int groupPosition,
int childPosition, long id) {
final BaseActivity activity = BaseActivity.get(RootsFragment.this);
final Item item = (Item) mAdapter.getChild(groupPosition, childPosition);
if (item instanceof RootItem) {
int index = parent.getFlatListPosition(ExpandableListView.getPackedPositionForChild(groupPosition, childPosition));
parent.setItemChecked(index, true);
activity.onRootPicked(((RootItem) item).root, true);
Bundle params = new Bundle();
params.putString("type", ((RootItem) item).root.title);
AnalyticsManager.logEvent("navigate", ((RootItem) item).root, params);
} else if (item instanceof AppItem) {
activity.onAppPicked(((AppItem) item).info);
} else {
throw new IllegalStateException("Unknown root: " + item);
}
return false;
}
};
代码示例来源:origin: stackoverflow.com
android.app.FragmentManager frag_mgr = getFragmentManager();
frag_mgr.beginTransaction().replace(R.id.content_frame, frag).commit();
xl.setItemChecked(position, true);
dl.closeDrawer(xl);
} else {
代码示例来源:origin: stackoverflow.com
mDrawerListView.setItemChecked(mCurrentSelectedPosition, true);
mCurrentSelectedPosition = position;
if (mDrawerListView != null) {
mDrawerListView.setItemChecked(position, true);
mDrawerListView.setItemChecked(position, true);
mDrawerListView.setSelection(position);
mDrawerListView.smoothScrollToPosition(position);
代码示例来源:origin: gigabytedevelopers/FireFiles
public void onCurrentRootChanged() {
if (mAdapter == null || mList == null) return;
final RootInfo root = ((BaseActivity) getActivity()).getCurrentRoot();
for (int i = 0; i < mAdapter.getGroupCount(); i++) {
for (int j = 0; j < mAdapter.getChildrenCount(i); j++) {
final Object item = mAdapter.getChild(i,j);
if (item instanceof RootItem) {
final RootInfo testRoot = ((RootItem) item).root;
if (Objects.equal(testRoot, root)) {
try {
long id = ExpandableListView.getPackedPositionForChild(i, j);
int index = mList.getFlatListPosition(id);
//mList.setSelection(index);
mList.setItemChecked(index, true);
} catch (Exception e){
CrashReportingManager.logException(e);
}
return;
}
}
}
}
}
代码示例来源:origin: stackoverflow.com
_expandableListView.setItemChecked(flatPosition , true);
_checkedPosition = position;
_expandableListView.setItemChecked(flatPosition , false);
内容来源于网络,如有侵权,请联系作者删除!