语言

IExpandableListAdapter.GetGroupView(Int32, Boolean, View, ViewGroup) 方法

定义

获取显示给定组的视图。

[Android.Runtime.Register("getGroupView", "(IZLandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;", "GetGetGroupView_IZLandroid_view_View_Landroid_view_ViewGroup_Handler:Android.Widget.IExpandableListAdapterInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Android.Views.View? GetGroupView(int groupPosition, bool isExpanded, Android.Views.View? convertView, Android.Views.ViewGroup? parent);
[<Android.Runtime.Register("getGroupView", "(IZLandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;", "GetGetGroupView_IZLandroid_view_View_Landroid_view_ViewGroup_Handler:Android.Widget.IExpandableListAdapterInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetGroupView : int * bool * Android.Views.View * Android.Views.ViewGroup -> Android.Views.View

参数

groupPosition
Int32

返回视图的组的位置

isExpanded
Boolean

组是展开还是折叠

convertView
View

要重复使用的旧视图(如果可能)。 在使用之前,应检查此视图是否为非 null 和适当的类型。 如果无法转换此视图以显示正确的数据,此方法可以创建新视图。 不能保证转换视图以前由该对象 #getGroupView(int, boolean, View, ViewGroup)创建。

parent
ViewGroup

此视图最终将附加到的父级

返回

对应于位于指定位置的组的视图

特性

注解

获取显示给定组的视图。 此视图仅适用于组-将使用组的子级的 #getChildView(int, int, boolean, View, ViewGroup)视图。

适用于 . 的 android.widget.ExpandableListAdapter.getGroupView(int, boolean, android.view.View, android.view.ViewGroup)Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于