您的位置:首页 > 编程语言

LinearLayout 点击事件 添加点击事件代码

2016-02-19 17:39 274 查看
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    android:layout_width="0dip"

    android:layout_height="100dip"

    android:layout_weight="1"

    android:background="@drawable/style_button_back"

    android:clickable="true"

    android:clipChildren="true"

    android:focusable="true"

    android:gravity="center"

    android:orientation="vertical" >

    <ImageView

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

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

    <TextView

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_marginTop="5dip"

        android:text="调度派车"

        android:textColor="#000000"

        android:textSize="18dip" />

</LinearLayout>

==================================================

  <LinearLayout

        android:layout_width="match_parent"

        android:layout_height="0dip"

        android:layout_weight="1"

        android:visibility="gone"

        android:background="#ffffff"

        android:orientation="vertical" >

        <LinearLayout

            android:layout_width="fill_parent"

            android:layout_height="100dip"

            android:layout_weight="1" >

            <include layout="@layout/main_item" />

            <include layout="@layout/main_item" />

            <include layout="@layout/main_item" />

        </LinearLayout>

    </LinearLayout>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: