一个顶部有按钮的list列表布局xml文件
2012-08-07 16:25
169 查看
本ui来之一个网上的程序。谢谢原作者的分享。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="250px"
android:layout_height="400px"
android:background="@drawable/white"
android:orientation="vertical" >
<TextView
android:id="@+id/mPath"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5px"
android:textColor="@drawable/blue"
android:textSize="18sp" >
</TextView>
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="330px" >
</ListView>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/white"
android:gravity="center"
android:orientation="horizontal" >
<Button
android:id="@+id/buttonConfirm"
android:layout_width="125px"
android:layout_height="fill_parent"
android:text="确定" />
<Button
android:id="@+id/buttonCancle"
android:layout_width="125px"
android:layout_height="fill_parent"
android:text="取消" />
</LinearLayout>
</LinearLayout>
////////////////////////
调用的java中:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.fileselect);
requestWindowFeature(Window.FEATURE_NO_TITLE);
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="250px"
android:layout_height="400px"
android:background="@drawable/white"
android:orientation="vertical" >
<TextView
android:id="@+id/mPath"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5px"
android:textColor="@drawable/blue"
android:textSize="18sp" >
</TextView>
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="330px" >
</ListView>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/white"
android:gravity="center"
android:orientation="horizontal" >
<Button
android:id="@+id/buttonConfirm"
android:layout_width="125px"
android:layout_height="fill_parent"
android:text="确定" />
<Button
android:id="@+id/buttonCancle"
android:layout_width="125px"
android:layout_height="fill_parent"
android:text="取消" />
</LinearLayout>
</LinearLayout>
////////////////////////
调用的java中:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.fileselect);
requestWindowFeature(Window.FEATURE_NO_TITLE);
相关文章推荐
- 1. 一个界面xml布局文件应仅inflate一次即可
- Android同一个xml布局文件在不同中显示效果不同
- 按钮 下拉列表 还有一个简单的记事本 文件读写等
- DOM解析XML文件1-ArrayAdapter_simple_list_item_1布局
- Layout inflation在Android环境中是一个专业术语,用于表示某个XML资源布局文件被解析并转化成为一个层级的View对象的过程。
- android getView方法不执行的一个原因是布局文件中没有给列表显示的位置
- 同一个ImageView根据xml文件来显示不同的图片--level-list
- DOM解析XML文件2-SimpleAdapter_simple_list_item_2布局
- 超好用的移动端布局自适应大小rem判断js文件及超过一定高度回到顶部按钮代码
- 使用XML布局文件和java代码共同控制UI界面做一个简易图片浏览器
- 通过xml布局文件实现按钮改变焦点设置背景图片
- 一个Android登陆/注册XML布局文件代码
- Android 在xml布局配置文件中给Button按钮添加事件
- 一个Android登陆/注册XML布局文件代码
- 新建 一个android工程,res/layout 下的xml布局文件无法预览
- android getView方法不执行的一个原因是布局文件中没有给列表显示的位置
- 取得一个文件的打开方式列表
- Attribute is missing the Android namespace prefix——android开发之xml布局文件
- you must supply a layout_height attribute——android开发之xml布局文件
- 关于Android中xml布局文件之android 入门xml布局文件