Lay_Weight 权重属性的使用

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin"
    tools:context="com.dr.app.drseamoniter.SearchConditionActivity"
    android:background="#F0F0F0"
    >

    <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="#F0F0F0"
        >
        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="#FFFFFF"
            android:gravity="center_vertical"
            android:padding="5dp"
            android:layout_margin="5dp"
            >
            <ImageView
                android:id="@+id/search_area_img"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:src="@drawable/search_area_img"
                android:gravity="center"
                android:layout_weight="2"
                />
            <TextView
                android:id="@+id/search_area_text"
                android:layout_height="fill_parent"
                android:layout_width="fill_parent"
                android:layout_weight="2"
                android:gravity="center"
                android:text="选择区域:"/>
            <com.dr.app.drseamoniter.spinner.SearchConditionSpinner
                android:id="@+id/search_area_condition"
                android:layout_height="fill_parent"
                android:layout_width="fill_parent"
                android:gravity="center"
                android:layout_weight="1"
                />
        </LinearLayout>
        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="#FFFFFF"
            android:gravity="center"
            android:padding="5dp"
            android:layout_margin="5dp"
            >
            <ImageView
                android:id="@+id/search_dev_img"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:src="@drawable/search_dev_img"
                android:gravity="center"
                android:layout_weight="2"/>
            <TextView
                android:id="@+id/search_dev_text"
                android:layout_height="fill_parent"
                android:layout_width="fill_parent"
                android:text="选择设备:"
                android:gravity="center"
                android:layout_weight="2"/>
            <com.dr.app.drseamoniter.spinner.SearchConditionSpinner
                android:id="@+id/search_dev_condition"
                android:layout_height="fill_parent"
                android:layout_width="fill_parent"
                android:gravity="center"
                android:layout_weight="1" />
        </LinearLayout>
        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="#FFFFFF"
            android:gravity="center"
            android:padding="5dp"
            android:layout_margin="5dp"
            >
            <ImageView
                android:id="@+id/search_begintime_img"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:src="@drawable/search_time_img"
                android:gravity="center"
                android:layout_weight="2"/>
            <TextView
                android:id="@+id/search_begintime_text"
                android:layout_height="fill_parent"
                android:layout_width="fill_parent"
                android:text="开始时间:"
                android:gravity="center"
                android:layout_weight="2"/>
            <EditText
                android:id="@+id/search_begintime_edittext"
                android:layout_height="fill_parent"
                android:layout_width="fill_parent"
                android:layout_weight="1"
                android:background="@null"
                android:inputType="text"
                android:gravity="center"
                android:textSize="15sp"/>
        </LinearLayout>
        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="#FFFFFF"
            android:gravity="center"
            android:padding="5dp"
            android:layout_margin="5dp"
            >
            <ImageView
                android:id="@+id/search_endtime_img"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:src="@drawable/search_time_img"
                android:gravity="center"
                android:layout_weight="2"/>
            <TextView
                android:id="@+id/search_endtime_text"
                android:layout_height="fill_parent"
                android:layout_width="fill_parent"
                android:gravity="center"
                android:text="结束时间:"
                android:layout_weight="2"/>
            <EditText
                android:id="@+id/search_endtime_edittext"
                android:layout_height="fill_parent"
                android:layout_width="fill_parent"
                android:layout_weight="1"
                android:background="@null"
                android:inputType="text"
                android:gravity="center"
                android:textSize="15sp"
                />
        </LinearLayout>
        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:padding="5dp"
            android:layout_margin="5dp"
            >
            <Button
                android:id="@+id/search_btn"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:padding="15dp"
                android:background="#0077D9"
                android:textColor="@android:color/white"
                android:text="查询"/>

        </LinearLayout>
    </LinearLayout>

</RelativeLayout>

参考博客Android:Layout_weight的深刻理解

Android --Search界面样式的更多相关文章

  1. Android学习系列(40)--Android主题和样式之系统篇(下)

    11)Widget样式(Widget Style) 特别说明,此处定义大量的系统内置控件的样式,对于重写原生控件的样式具有很大的参考价值. <!-- Widget styles --> & ...

  2. Android开发工程师文集-Fragment,适配器,轮播图,ScrollView,Gallery 图片浏览器,Android常用布局样式

    Android开发工程师文集-Fragment,适配器,轮播图,ScrollView,Gallery 图片浏览器,Android常用布局样式 Fragment FragmentManager frag ...

  3. Android典型界面设计(5)——使用SlidingMenu和DrawerLayout分别实现左右侧边栏

    一.问题描述 侧边栏是Android应用中十分常见的界面效果,可随主屏在左侧或右侧联动,是特别适应手机等小屏幕特性的典型界面设计方案之一,常用作应用的操作菜单,如图所示 实现侧边栏可以使用第三方组件s ...

  4. Android典型界面设计(6)——ActionBar Tab+ViewPager+Fagment实现滑动导航

    一.问题描述 在Android典型界面设计一文中,实现典型滑动导航界面,其实使用ActionBar 也可以轻松实现这一效果,甚至也可实现类似Android典型界面设计(3)的双导航效果.可见Actio ...

  5. Android典型界面设计(7) ——DrawerLayout+Fragement+ViewPager+PagerTabStrip实现双导航

    一.问题描述 在Android典型界面设计(3)的我们实现了双导航效果,即外层底部导航和内部区域的头部导航,如网易新闻等很多应用采用了这种导航,但Google提供DrawerLayout可实现抽屉式导 ...

  6. android中的样式主题和国际化

    一.Android中的样式和主题     1.1样式     样式是作用在控件上的,它是一个包含一个或者多个view控件属性的集合.android style类似网页设计中的css设计思路,可以让设计 ...

  7. Android流行界面结构——Fragment通过ViewPager(带指示器)嵌套Fragment结构的创建方法详解

    原创文章,转载请注明出处http://www.cnblogs.com/baipengzhan/p/6287213.html 当前Android流行界面结构的一种——Fragment通过ViewPage ...

  8. (转载)Android引导界面实现

    Android引导界面实现 Android   2014-07-10 14:47:36 发布 您的评价:       4.0   收藏     3收藏 ViewPager类提供了多界面切换的新效果,是 ...

  9. Android RatingBar 自定义样式

    Android RatingBar 自定义样式 1.先定义Style: <style name="RadingStyle" parent="@android:sty ...

随机推荐

  1. 【iCore、iCore2 双核心板】EPCS 实验(SPI Flash)(基于Verilog语言)

    _____________________________________ 深入交流QQ群: A: 204255896(1000人超级群,可加入) B: 165201798(500人超级群,满员) C ...

  2. Scrum会议3(Beta版本)

    组名:天天向上 组长:王森 组员:张政.张金生.林莉.胡丽娜 代码地址:HTTPS:https://git.coding.net/jx8zjs/llk.git SSH:git@git.coding.n ...

  3. mysql 关于日期时间的字段类型

    mysql日期和时间类型 mysql有5种表示时间值的日期和时间类型,分别为.DATE,TIME,YEAR,DATETIME,TIMESTAMP. TIMESTAMP类型有专有的自动更新特性, TIM ...

  4. Yii源码阅读笔记(七)

    接上次的组件(component)代码: /** * Returns a list of behaviors that this component should behave as. * 定义该对象 ...

  5. subclipse安装后从svn资源库视图check out的资源无法创建server

    不要从根目录下check out,只要把根目录下所需要的项目check out即可.

  6. quanpailie quanbianli

    #include<stdio.h>char data[5]={'a','b','c','d','e'};int vist[5]={0};char step[5]={0};char bu[5 ...

  7. MySQL 绿色版(zip) 安装

    设置环境变量Path,指向到MYSQL下的bin目录 修改MYSQL下的my-default.ini basedir=%MYSQL_HOME% datadir=%MYSQL_HOME%\data 到M ...

  8. 【转】C#中HttpWebRequest的用法详解

    本文实例讲述了C#中HttpWebRequest的用法.分享给大家供大家参考.具体如下: HttpWebRequest类主要利用HTTP 协议和服务器交互,通常是通过 GET 和 POST 两种方式来 ...

  9. Bootstrap 路径分页标签和徽章组件

    一.路径组件 路径组件也叫做面包屑导航. //面包屑导航 <ol class="breadcrumb"> <li><a href="#&qu ...

  10. 使用JetBrains dotMemory 4.0分析内存

    安装下载地址:http://www.jetbrains.com/profiler/ 1.在本地启动web应用后,打开dotMemory,附加进程 2.附加后会看到集中颜色得粗条,不断往左边走动,这是内 ...