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>
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>
相关文章推荐
- java方法,构造方法
- AspectJ基础学习之二搭建环境(转载)
- AspectJ基础学习之一简介(转载)
- Python基础学习笔记(二)语法简介
- 菜鸟运维笔记:安装MySQL,PHP及phpMyAdmin
- windows系统下Python环境的搭建
- python开发_常用的python模块及安装方法
- 一些java小细节问题
- 一起看代码来玩玩QT之01Hello world
- python设置环境变量
- gitHub好的第三方
- 编程技巧 - Button多参数点击
- [算法]Evaluate Reverse Polish Notation
- thinkphp源码解析 (Version 3.1) -4 /Lib/Core/Dispatcher.class
- qt编译出现 /usr/bin/ld: cannot find -lQtCore的解决方法
- Java 等待多个子线程 join
- java 遍历某月的所有日期
- Google反编译新工具——Enjarify
- 5.Git标签管理及使用GitHub
- Using python-keystoneclient.v3 API