当前位置:编程学习 > wap >>

UI view寫入的問題

各位大大好:
小妹寫了一個arraylist
想要透過listview將位於這個arraylist中的值顯示出來
(其中,listview包在TableLayout中)
想要請問一下 這要如何實現呢?ˊˋ
我的xml如下:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
  android:layout_width="fill_parent" 
  android:layout_height="fill_parent"
  xmlns:android="http://schemas.android.com/apk/res/android">

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="horizontal">
    
    <!-- android:text="@string/city_prompt" 提示信息 -->
    <!-- android:entries="@array/city_labels" 下拉列表內容 -->
    

    
    <!-- 第一層 -->
    <Spinner
        android:id="@+id/city"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:entries="@array/city_labels"
        android:text="@string/city_prompt" />
    
    <!-- 第二層 -->
    <Spinner
        android:id="@+id/zip"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/area_prompt" />
 

    <TableLayout
        android:id="@+id/user_list"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="1dip"
        android:background="#ffcccccc"
        android:stretchColumns="*"  >
    </TableLayout>
    
    <TableRow
    android:clickable="true"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="#ffffcc99"
    android:layout_margin="3dip">
       
        
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</ListView>  
    
</TableRow>
</LinearLayout>
</ScrollView>
--------------------编程问答-------------------- 搜一下 simpleAdapter 或者 baseAdapter --------------------编程问答-------------------- 可否麻煩在詳細一點呢?ˊˋ 萬分感謝(跪 --------------------编程问答-------------------- http://blog.csdn.net/boyupeng/article/details/6323021 参考一下
补充:移动开发 ,  Android
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,