Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android ExpandableListView组指示器重力_Android_Expandablelistview_Gravity - Fatal编程技术网

Android ExpandableListView组指示器重力

Android ExpandableListView组指示器重力,android,expandablelistview,gravity,Android,Expandablelistview,Gravity,如何更改Android的默认值GroupIndicatorgravityExpandableListView?您不能更改默认值。。但是如果您正在实现自定义适配器。。您可以将一个带有组指示符背景的复选框放置在任何您想要的位置。您不能更改默认值。。但是如果您正在实现自定义适配器。。您可以设置一个带有组指示符背景的复选框,并将其放置在您想要的任何位置。在“expandablelist”中设置android:groupIndicator=“@null” 在“groupview”xml中添加ImageVi

如何更改Android的默认值
GroupIndicator
gravity
ExpandableListView

您不能更改默认值。。但是如果您正在实现自定义适配器。。您可以将一个带有组指示符背景的复选框放置在任何您想要的位置。

您不能更改默认值。。但是如果您正在实现自定义适配器。。您可以设置一个带有组指示符背景的复选框,并将其放置在您想要的任何位置。

在“expandablelist”中设置android:groupIndicator=“@null”

在“groupview”xml中添加ImageView


在“expandablelist”中设置android:groupIndicator=“@null”

在“groupview”xml中添加ImageView

public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
     ImageView mGroupIndicator=(ImageView)convertView.findViewById(R.id.mGroupimage);
     if(isExpanded){
         mGroupIndicator.setImageResource(R.drawable.expanded);
     }else{
         mGroupIndicator.setImageResource(R.drawable.collapsed);
     }
}