动态刷新页面(滚动页面)

 1 <!-- scroll        n. 卷轴,画卷;名册;卷形物-->
 2 <ScrollView
 3     android:layout_width="fill_parent"
 4     android:layout_height="fill_parent" >
 5 
 6     <LinearLayout
 7         android:id="@+id/ll"
 8         android:layout_width="fill_parent"
 9         android:layout_height="fill_parent"
10         android:orientation="vertical" >
11     </LinearLayout>
12 </ScrollView>

 

 1 public void onClick(View view) {
 2     
 3     // 添加一个TextView向llGroup
 4     
 5     // 定义一个textview对象
 6     TextView tv = new TextView(this);
 7     tv.setText("张三   女   34");
 8     
 9     // 把textview对象添加到linearlayout中
10     llGroup.addView(tv);
11 }

 

posted on 2015-12-16 22:28  starFarming  阅读(414)  评论(0编辑  收藏  举报