Android开发教程:ListView用法解析


首先还是先把布局文件给大家贴出来

R.layout.frame.xml

  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <LinearLayout xmlns:Android="http://schemas.android.com/apk/res/android"  
  3.     android:layout_width="fill_parent"  
  4.     android:layout_height="fill_parent"  
  5.     android:paddingTop="1pt"  
  6.     android:paddingLeft="1pt"  
  7.     android:paddingRight="10pt"  
  8.     android:orientation="horizontal" >  
  9.     <TextView   
  10.         android:id ="@+id/appname"  
  11.         android:layout_width="fill_parent"  
  12.         android:layout_height="wrap_content"  
  13.         android:textSize="15pt"  
  14.         />  
  15. </LinearLayout>

这是activity采用的布局文件,现在解释一下中间几个属性的含义

android:orientation 指定LineatLayout 是横向的还是纵向的 "vertical"纵向

android:drawSelectorOnTop 指定 容器是否画在内容上方

选择"false"

Android开发教程:ListView用法解析

选择"true"

Android开发教程:ListView用法解析
  • 1
  • 2
  • 下一页

相关内容