?
このドキュメントでは、 php中國(guó)語(yǔ)ネットマニュアル リリース
ResourceCursorTreeAdapter
版本:Android 3.1 r1
?
結(jié)構(gòu)
繼承關(guān)系
public abstract classt ResourceCursorTreeAdapter extends CursorTreeAdapter
?
???????? java.lang.Object
android.widget.BaseExpandableListAdapter
???????? android.widget.CursorTreeAdapter
?????????????????? android.widget.ResourceCursorTreeAdapter
?
子類及間接子類
直接子類
???????? SimpleCursorTreeAdapter
?
類概述
一個(gè)簡(jiǎn)單的可擴(kuò)展的ExpandableListAdapter,通過(guò)在XML文件來(lái)創(chuàng)建views。你可以指定一個(gè)定義了views外觀的XML文件。
?
構(gòu)造函數(shù)
public ResourceCursorTreeAdapter (Context context, Cursor cursor, int collapsedGroupLayout, int expandedGroupLayout, int childLayout, int lastChildLayout)
構(gòu)造函數(shù)。
參數(shù)
context??? 和正在運(yùn)行的SimpleListItemFactory關(guān)聯(lián)的ListView的上下文
??????????????????????????? cursor?????? 數(shù)據(jù)庫(kù)游標(biāo)
??????????????????????????? collapsedGroupLayout???? 定義了收縮組的視圖布局文件的資源標(biāo)識(shí)
expandedGroupLayout??? 定義了展開(kāi)組的視圖布局文件的資源標(biāo)識(shí)
childLayout??????????????? 定義了除了最后一個(gè)的所有子視圖的布局文件的資源標(biāo)識(shí)
lastChildLayout??????? 定義了一組中最后一個(gè)子視圖的布局文件的資源標(biāo)識(shí)
?
public ResourceCursorTreeAdapter (Context context, Cursor cursor, int collapsedGroupLayout, int expandedGroupLayout, int childLayout)
構(gòu)造函數(shù)。????
參數(shù)
context??? 和正在運(yùn)行的SimpleListItemFactory關(guān)聯(lián)的ListView的上下文
??????????????????????????? cursor?????? 數(shù)據(jù)庫(kù)游標(biāo)
??????????????????????????? collapsedGroupLayout???? 定義了收縮組的視圖布局文件的資源標(biāo)識(shí)
expandedGroupLayout??? 定義了展開(kāi)組的視圖布局文件的資源標(biāo)識(shí)
childLayout??????????????? 定義了除了最后一個(gè)的所有子視圖的布局文件的資源標(biāo)識(shí)
?
public ResourceCursorTreeAdapter (Context context, Cursor cursor, int groupLayout, int childLayout)????
構(gòu)造函數(shù)。????
參數(shù)
context??? 和正在運(yùn)行的SimpleListItemFactory關(guān)聯(lián)的ListView的上下文
??????????????????????????? cursor?????? 數(shù)據(jù)庫(kù)游標(biāo)
??????????????????????????? groupLayout??? 為所有組定義了視圖布局文件的資源標(biāo)識(shí)
expandedGroupLayout??? ???????? 定義了展開(kāi)組的視圖布局文件的資源標(biāo)識(shí)
childLayout?? 定義了除了最后一個(gè)的所有子視圖的布局文件的資源標(biāo)識(shí)
?
公共方法
???????? protected abstract View newChildView (Context context, Cursor cursor, boolean ??? isLastChild, ViewGroup parent)
???????? 創(chuàng)建一個(gè)新的子元素視圖并持有指向數(shù)據(jù)的游標(biāo)cursor。
?????????????????? 參數(shù)
??????????????????????????? context? ???????? 應(yīng)用程序上下文對(duì)象
??????????????????????????? cursor? ?????????? 獲取數(shù)據(jù)的游標(biāo)對(duì)象,它已經(jīng)移動(dòng)到正確的位置
??????????????????????????? IsLastChild? ?子元素是否處于組中的最后一個(gè)
??????????????????????????? parent? ????新視圖(View)所依附于的父對(duì)象。
?????????????????? 返回值
??????????????????????????? 新創(chuàng)建的視圖
?
???????? protected abstract View newGroupView (Context context, Cursor cursor, boolean isExpanded, ViewGroup parent)
???????? 創(chuàng)建一個(gè)新的組視圖并持有組中指向數(shù)據(jù)的游標(biāo)cursor。
?????????????????? 參數(shù)
??????????????????????????? context? ???????? 應(yīng)用程序上下文對(duì)象
??????????????????????????? cursor? ?????????? 獲取數(shù)據(jù)的游標(biāo)對(duì)象,它已經(jīng)移動(dòng)到正確的位置
??????????????????????????? isExpanded?? 該組是否展開(kāi)狀態(tài)
??????????????????????????? parent? ?????新視圖(View)所依附于的父對(duì)象。
?????????????????? 返回值
??????????????????????????? 新創(chuàng)建的視圖
?