热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

android.widget.ExpandableListAdapter.getGroupCount()方法的使用及代码示例

本文整理了Java中android.widget.ExpandableListAdapter.getGroupCount()方法的一些代码示例,展示了Exp

本文整理了Java中android.widget.ExpandableListAdapter.getGroupCount()方法的一些代码示例,展示了ExpandableListAdapter.getGroupCount()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ExpandableListAdapter.getGroupCount()方法的具体详情如下:
包路径:android.widget.ExpandableListAdapter
类名称:ExpandableListAdapter
方法名:getGroupCount

ExpandableListAdapter.getGroupCount介绍

暂无

代码示例

代码示例来源:origin: androidquery/androidquery

public T expand(boolean expand){

if(view instanceof ExpandableListView){

ExpandableListView elv = (ExpandableListView) view;
ExpandableListAdapter ela = elv.getExpandableListAdapter();

if(ela != null){

int count = ela.getGroupCount();

for(int i = 0; i if(expand){
elv.expandGroup(i);
}else{
elv.collapseGroup(i);
}
}

}


}

return self();
}

代码示例来源:origin: xiangzhihong/gpuImage

public int getCount() {
/*
* Total count for the list view is the number groups plus the
* number of children from currently expanded groups (a value we keep
* cached in this class)
*/
return mExpandableListAdapter.getGroupCount() + mTotalExpChildrenCount;
}

代码示例来源:origin: jclehner/rxdroid

public boolean isListEmpty()
{
if(mAdapter != null)
return mAdapter.getGroupCount() == 0;
return true;
}

代码示例来源:origin: jclehner/rxdroid

public void collapseAll()
{
mExpandAll = false;
if(mList == null || mAdapter == null)
return;
for(int i = 0; i != mAdapter.getGroupCount(); ++i)
mList.collapseGroup(i);
}

代码示例来源:origin: mttkay/calculon

public void hasGroups() {
assertFalse("list view expected not to be empty, but it was", getAdapter().getGroupCount() > 0);
}

代码示例来源:origin: mttkay/calculon

public void hasGroups(int count) {
int actual = getAdapter().getGroupCount();
assertEquals("list group count mismatch:", count, actual);
}

代码示例来源:origin: jclehner/rxdroid

private boolean isAllCollapsed() {
return mCollapsedCount == getListAdapter().getGroupCount();
}

代码示例来源:origin: gigabytedevelopers/FireFiles

private void restoreExpandedState(ArrayList expandedIds) {
this.expandedIds = expandedIds;
if (expandedIds != null) {
ExpandableListView list = mList;
ExpandableListAdapter adapter = mAdapter;
if (adapter != null) {
for (int i=0; i long id = adapter.getGroupId(i);
if (expandedIds.contains(id)) list.expandGroup(i);
}
}
}
}

代码示例来源:origin: mttkay/calculon

public MultiViewAssertion groups() {
ExpandableListAdapter adapter = getAdapter();
int count = adapter.getGroupCount();
List views = new ArrayList(count);
for (int i = 0; i views.add(adapter.getGroupView(i, false, null, listView));
}
return new MultiViewAssertion(testCase, activity, views);
}

代码示例来源:origin: jclehner/rxdroid

private void expandAllInternal(/*boolean animate*/)
{
for(int i = 0; i != mAdapter.getGroupCount(); ++i)
{
if(Version.SDK_IS_JELLYBEAN_OR_NEWER)
mList.expandGroup(i /*, animate*/);
else
mList.expandGroup(i);
}
}
}

代码示例来源:origin: andresth/Kandroid

@Override
public void onResume() {
super.onResume();
assert getView() != null : "ProjectInactiveTasksFragment: getView() returned null";
ExpandableListView lv = (ExpandableListView) getView().findViewById(R.id.expandable_list);
for (int i = 0; i lv.expandGroup(i);
}
}

代码示例来源:origin: mttkay/calculon

public ViewAssertion lastGroup() {
return group(getAdapter().getGroupCount() - 1);
}

代码示例来源:origin: andresth/Kandroid

@Override
public void onResume() {
super.onResume();
assert getView() != null : "ProjectTaskFragment: getView() returned null";
ExpandableListView lv = (ExpandableListView) getView().findViewById(R.id.expandable_list);
for (int i = 0; i lv.expandGroup(i);
}
}

代码示例来源:origin: andresth/Kandroid

@Override
public void onResume() {
super.onResume();
assert getView() != null : "ProjectOverdueTasksFragment: getView() returned null";
ExpandableListView lv = (ExpandableListView) getView().findViewById(R.id.expandable_list);
for (int i = 0; i lv.expandGroup(i);
}
}

代码示例来源:origin: it.tidalwave.bluebill/it-tidalwave-android-utilities

public void run()
{
final int groupCount = expandableListView.getExpandableListAdapter().getGroupCount();
if (groupCount > 0)
{
for (int i = 0; i {
expandableListView.collapseGroup(i);
}
// logger.info(">>>> expanding group %s...", groupCount - 1);
expandableListView.expandGroup(groupCount - 1);
}
}
});

代码示例来源:origin: it.tidalwave.bluebill/it-tidalwave-android-utilities

public void run()
{
final int groupCount = expandableListView.getExpandableListAdapter().getGroupCount();
if (groupCount > 0)
{
for (int i = 0; i {
expandableListView.collapseGroup(i);
}
// logger.info(">>>> expanding group %s...", groupCount - 1);
expandableListView.expandGroup(groupCount - 1);
}
}
});

代码示例来源:origin: VREMSoftwareDevelopment/WiFiAnalyzer

void update(@NonNull List wiFiDetails, ExpandableListView expandableListView) {
updateGroupBy();
if (isGroupExpandable() && expandableListView != null) {
int groupCount = expandableListView.getExpandableListAdapter().getGroupCount();
for (int i = 0; i WiFiDetail wiFiDetail = getWiFiDetail(wiFiDetails, i);
if (expanded.contains(getGroupExpandKey(wiFiDetail))) {
expandableListView.expandGroup(i);
} else {
expandableListView.collapseGroup(i);
}
}
}
}

代码示例来源:origin: mttkay/calculon

public ViewAssertion lastChild(int groupPosition) {
return child(getAdapter().getGroupCount() - 1, getAdapter().getChildrenCount(groupPosition) - 1);
}

代码示例来源:origin: jclehner/rxdroid

private void updateListView(int flags)
{
getArguments().putInt("flags", flags);
gatherEventInfos(flags);
setListAdapter(new Adapter());
if(!Settings.getBoolean(Keys.LOG_IS_ALL_COLLAPSED, true))
expandAll(false);
else
mCollapsedCount = getListAdapter().getGroupCount();
}

代码示例来源:origin: VREMSoftwareDevelopment/WiFiAnalyzer

@Test
public void testAfterUpdateWithGroupByChannel() {
// setup
List wiFiDetails = withWiFiDetails();
when(settings.getGroupBy()).thenReturn(GroupBy.CHANNEL);
when(expandableListView.getExpandableListAdapter()).thenReturn(expandableListAdapter);
when(expandableListAdapter.getGroupCount()).thenReturn(wiFiDetails.size());
// execute
fixture.update(wiFiDetails, expandableListView);
// validate
verify(settings).getGroupBy();
verify(expandableListView).getExpandableListAdapter();
verify(expandableListAdapter).getGroupCount();
assertEquals(GroupBy.CHANNEL, fixture.getGroupBy());
}

推荐阅读
author-avatar
King347
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有