freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

listactivity應(yīng)用程序開發(fā)手冊(編輯修改稿)

2025-07-26 07:25 本頁面
 

【文章內(nèi)容簡介】 @id/android:list android:layout_weight=2 android:drawSelectorOnTop=false android:layout_width=wrap_content android:layout_height=wrap_content/ TextView android:id=@id/android:empty android:layout_width=wrap_content android:layout_height=wrap_content android:text=no data/ /LinearLayout?xml version= encoding=utf8?LinearLayout xmlns:android= android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent TextView android:id=@+id/item android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=28sp android:textColor=FF0000/ TextView android:id=@+id/item2 android:layout_width=wrap_content android:textSize=18sp android:textColor=00FF00 android:layout_height=wrap_content//LinearLayout程序運行的效果如下: 使用SimpleCursorAdapterSimpleCursorAdapter是把數(shù)據(jù)庫中查詢到的結(jié)果映射到listView的方式,這個類的使用方式跟SimpleAdapter中的例子方式類似,本文不作細(xì)講,主要說說數(shù)據(jù)映射段。首先是通過數(shù)據(jù)庫查找數(shù)據(jù),數(shù)據(jù)保存在Cursor類的對象cursor中。Cursor cursor = managedQuery(getIntent().getData(), PROJECTION, null, null, )。然后開始把數(shù)據(jù)映射到SimpleCursorAdapter對象,這個對象的第二個參數(shù)是列表中每一行的布局,第三個參數(shù)是當(dāng)前保存查詢出數(shù)據(jù)的游標(biāo)。第四個參數(shù)和第五個參數(shù)跟SimpleAdapter中對應(yīng)的參數(shù)相同。SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, , cursor,new String[] { }, new int[] { })。把映射的SimpleCursorAdapter對象設(shè)置到listActivity中。setListAdapter(adapter)。然后其他的應(yīng)用方式跟listActivity方式完全一樣。 定制自己的Adapter由于目前android還不夠強(qiáng)大,很多l(xiāng)istAdapter需要我們自己定制,因此我們可以根據(jù)我們的需要創(chuàng)建一個繼承于BaseAdapter的類,然后把我們自己定制的對象設(shè)置到listActivity中。比如我們要創(chuàng)建一個列表,列表的前面是一個圖標(biāo),后面是文本??蠢尤缦拢合葎?chuàng)建每一行中顯示的View,如下:public static class ImageTextView extends LinearLayout { public TextView mTextView。 public ImageView mImageView。
點擊復(fù)制文檔內(nèi)容
試題試卷相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1