草庐IT

groupPosition

全部标签

android - GridView在android中的可扩展列表中

我想在可扩展列表中放置一个带有图像的gridview...我已经做到了,但是gridview不显示所有项目...如何使我的可扩展列表子项适应gridview大小?列表适配器publicclassCustomListAdapterextendsBaseExpandableListAdapter{String[]catg={"Administração,EscritorioeIndustria","CulturaeEntretenimento","EducaçãoeCrianças","EventoseEstadodotempo","Amigos,FamiliaeHabitações","

android - GridView在android中的可扩展列表中

我想在可扩展列表中放置一个带有图像的gridview...我已经做到了,但是gridview不显示所有项目...如何使我的可扩展列表子项适应gridview大小?列表适配器publicclassCustomListAdapterextendsBaseExpandableListAdapter{String[]catg={"Administração,EscritorioeIndustria","CulturaeEntretenimento","EducaçãoeCrianças","EventoseEstadodotempo","Amigos,FamiliaeHabitações","

android - ExpandableListView 中的 groupPosition 给了我错误的值

编辑我找到了解决方案,请看下面。原创:我创建了一个ExpandableListView,它看起来像这样:第0组-child0、child1、child2第1组-child0、child1、child2、child3第2组-child0、child1、child2第3组-child0、child1、child2、child3、child4...每个组View有3~5个subview,我强制展开所有组View,mExpandableListView=(ExpandableListView)mView.findViewById(R.id.expandable_list);Collection

android - ExpandableListView 在尝试在 Android 中显示 subview 时有错误的 groupPosition

我遇到了一个我已经处理了一段时间的问题。我正在使用带有ViewHolder的ExpandableListView。我知道ExpandableListView重用了View,我认为这就是我遇到的问题。我在列表中有3个View,如果我选择1,然后选择2,然后选择3,那么一切都很好,它会显示正确的subview。尽管当我首先选择3时,所有其他subview都具有相同的groupPosition。如果我先选择2,那么3是正确的,但是1显示的是第三个subview。我希望它们都固定在正确的groupPosition上,这样它们就不会改变。这是我的ExpandableListView适配器:pub

android - ExpandableListView -UnsupportedOperationException : addView(View, LayoutParams) 在 AdapterView 中不受支持

我正在android中实现可扩展ListView,但我收到了上述标题错误。请帮帮我。主要Activity是-packagecom.expand;importandroid.app.Activity;importandroid.os.Bundle;importandroid.util.DisplayMetrics;importandroid.util.Log;importandroid.view.View;importandroid.widget.ExpandableListView;importandroid.widget.Toast;publicclassMyExpandableLi

android - ExpandableListView -UnsupportedOperationException : addView(View, LayoutParams) 在 AdapterView 中不受支持

我正在android中实现可扩展ListView,但我收到了上述标题错误。请帮帮我。主要Activity是-packagecom.expand;importandroid.app.Activity;importandroid.os.Bundle;importandroid.util.DisplayMetrics;importandroid.util.Log;importandroid.view.View;importandroid.widget.ExpandableListView;importandroid.widget.Toast;publicclassMyExpandableLi

android - 避免将 null 作为 View 根传递(需要在膨胀布局的根元素上解析布局参数)

为rootstudio传递null会给我这个警告:Avoidpassingnullastheviewroot(needtoresolvelayoutparametersontheinflatedlayout'srootelement)它在getGroupView中显示一个空值。请帮忙。publicclassExpandableListAdapterextendsBaseExpandableListAdapter{privateContext_context;privateList_listDataHeader;//headertitles//childdatainformatofhea

android - 避免将 null 作为 View 根传递(需要在膨胀布局的根元素上解析布局参数)

为rootstudio传递null会给我这个警告:Avoidpassingnullastheviewroot(needtoresolvelayoutparametersontheinflatedlayout'srootelement)它在getGroupView中显示一个空值。请帮忙。publicclassExpandableListAdapterextendsBaseExpandableListAdapter{privateContext_context;privateList_listDataHeader;//headertitles//childdatainformatofhea