linearLayout添加

龙龙酱丶 发布于 2013/08/18 18:18
阅读 326
收藏 0

本人想在listView的item下面再添加一行按钮,所以要加一行linearLayout,试了好多次,新加入的layout都无法显示,希望好心人帮助

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:orientation="horizontal" 

android:background="@drawable/item_bg"

android:layout_width="fill_parent"

android:layout_height="fill_parent">


<LinearLayout 

    android:orientation="horizontal"

android:layout_width="fill_parent" 

android:layout_height="wrap_content"

android:layout_marginTop="@dimen/default_item_margin_v"

android:layout_marginBottom="@dimen/default_item_margin_v">


<CheckBox android:id="@+id/radio"

android:focusable="false"

android:layout_marginLeft="@dimen/default_item_margin_h"

android:layout_width="wrap_content"

android:layout_height="wrap_content" />


<RelativeLayout android:layout_width="@dimen/icon_size"

android:layout_marginLeft="@dimen/default_item_margin_h"

android:layout_height="@dimen/icon_size">


<ImageView android:id="@+id/type" android:layout_width="@dimen/icon_size"

android:layout_height="@dimen/icon_size"

android:src="@drawable/img_folder" />

<ImageView android:id="@+id/status"

android:layout_alignParentRight="true"

android:layout_alignParentBottom="true"

android:layout_width="@dimen/mini_icon_size"

android:layout_height="@dimen/mini_icon_size"

android:src="@drawable/img_none" />

</RelativeLayout>

<LinearLayout android:orientation="vertical"

android:layout_marginLeft="@dimen/default_item_margin_h"

android:layout_marginRight="@dimen/default_item_margin_h"

android:layout_weight="1" android:layout_width="fill_parent"

android:layout_height="fill_parent">

<TextView android:id="@+id/name" android:textColor="@color/list_txt_color_1"

android:layout_weight="1" android:maxLines="1" 

android:layout_width="fill_parent" android:ellipsize="end"

android:layout_height="wrap_content" android:gravity="center_vertical"

android:textAppearance="?android:attr/textAppearanceMedium" />

<TextView android:id="@+id/info" android:textColor="@color/list_txt_color_2"

android:layout_weight="1" android:maxLines="1" 

android:ellipsize="end"

android:layout_width="fill_parent"

android:layout_height="wrap_content" />

</LinearLayout>


<ImageView

    android:id="@+id/img_dis_attention"

    android:layout_width="wrap_content"

    android:layout_height="wrap_content"

    android:layout_marginTop="@dimen/default_item_margin_h"

    android:layout_marginLeft="@dimen/default_item_margin_h"

    android:layout_marginRight="@dimen/default_item_margin_h"

    android:src="@drawable/file_down" />


</LinearLayout>


    <LinearLayout

        android:id="@+id/layout_other"

        android:layout_width="fill_parent"

        android:layout_height="wrap_content"

        android:background="#808080"

        android:gravity="center"

        android:orientation="horizontal">

</LinearLayout>


</LinearLayout>


加载中
返回顶部
顶部