主要练习一下RelativeLayout和LinearLayout

<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:background="#3186D9"
tools:context="${relativePackage}.${activityClass}" > <ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:src="@drawable/icon_home" /> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="12dp"
android:text="北京"
android:textColor="#FDFDFD" /> <ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:src="@drawable/icon_more" /> <TextView
android:id="@+id/tv_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="70dp"
android:text="29"
android:textColor="#fff"
android:textSize="50sp" /> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@id/tv_number"
android:layout_toRightOf="@id/tv_number"
android:text="°"
android:textColor="#FDFDFD"
android:textSize="30sp" /> <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_number"
android:layout_centerHorizontal="true"
android:orientation="horizontal" > <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:text="多云"
android:textColor="#FDFDFD" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:text=" | "
android:textColor="#bbb" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:text="空气优"
android:textColor="#FDFDFD" />
</LinearLayout> </RelativeLayout>

[android] 天气app布局练习的更多相关文章

  1. [android] 天气app布局练习(四)

    主要练习一下获取网络数据和解析xml MainActivity.java package com.example.weatherreport; import java.io.UnsupportedEn ...

  2. [android] 天气app布局练习(二)

    主要练习一下GridView MainActivity.java package com.example.weatherreport; import java.util.ArrayList; impo ...

  3. [android] 天气app布局练习(三)

    主要练习LinearLayout和layout_weight属性 <RelativeLayout xmlns:android="http://schemas.android.com/a ...

  4. 制作一个功能丰富的Android天气App

    简易天气是一个基于和风天气数据采用MD设计的Android天气App.目前的版本采用传统的MVC模式构建.通过丰富多彩的页面为用户提供日常所需的天气资讯. 项目说明 项目放在github上面 地址是: ...

  5. [Android]天气App 2 项目搭建

       对于天气App,为了简化一些功能,暂时模仿MUUI系统提供的那个App.    本项目需要引入本人经常使用的一个工具库DroidTool,这个是本人根据工作中,收集到一些工具类,下载地址.    ...

  6. [Android]天气App 3 网络数据的请求和Json解析

      Android客户端开发,不仅仅是在Android端开发,还需要有相应的后台服务支持,否则的话,客户端的数据就只能放到本地自己做处理.我认为的原生态的App就是对应服务端的Client.他能像浏览 ...

  7. [Android]天气App 1

    闲赋在家,无事可做就想着做点东西,于是乎把玩手机,我最常用的就是看天气,基本上我每天起来第一件事就是看天气,哈哈,用别人的这么爽,为什么不自己整一个关于天气的应用呢,墨迹天气.小米系统自带的天气.ya ...

  8. Android学习系列(5)--App布局初探之简单模型

    人类科技的进步源自探索,探索来自于发现本原,当然App布局没这么先进,本文也只是一个归类总结.这篇文章是Android开发人员的必备知识,是我特别为大家整理和总结的,不求完美,但是有用. Androi ...

  9. Android经典项目开发之天气APP实例分享

    原文:Android经典项目开发之天气APP实例分享 版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/mzc186/article/details/5 ...

随机推荐

  1. VSM Import Cluster功能验证一(准备篇)

    一.概述 本文档记录了VSM Import Cluster功能验证过程及过程中遇到的问题. 二.准备 2.1.网络规划 1) Management Network:VSM控制节点对其他节点的管理网络, ...

  2. socket-详细分析No buffer space available(转载)

    文章原文出处:http://www.cnblogs.com/hjwublog/p/5114380.html 今天在公司服务器上部署运行的后台程序出现大面积接口无法调用的问题,查看后台控制台打印如下信息 ...

  3. binlog2sql

    从MySQL binlog解析出你要的SQL.根据不同选项,你可以得到原始SQL.回滚SQL.去除主键的INSERT SQL等. 安装 shell> git clone https://gith ...

  4. NOI2017 酱油记

    侥幸混进市队让我晚退役了几个月..不过终究还是退役了呢..这应该是最后一篇游记了吧.. 考前半个月都在安徽集训..然后发现所有人都停课集训..只有我暑假了开始.. 反正上课各种听不懂..各种被大佬虐. ...

  5. leecode刷题(9)-- 有效的数独

    leecode刷题(9)-- 有效的数独 有效的数独 描述: 判断一个 9x9 的数独是否有效.只需要根据以下规则,验证已经填入的数字是否有效即可. 数字 1-9 在每一行只能出现一次. 数字 1-9 ...

  6. 自己实现一个shell

    用C实现一个简单的交互式shell,要求:当用户输入一行命令时,识别程序名和参数并调用适当的exec函数执行程序,等待执行完成后给出提示符. exec函数实际上是六种以exec开头的函数,统称exec ...

  7. jmeter简单的接口请求

    骤是:在测试计划下面新建一个线程组,线程组下面添加请求,再线程下加入HTTP信息头管理器(如果要求传此参数的话)请求中添加结果和断言 1.打开页面添加一个线程组: 2.线程组中设置参数: 很重要的几个 ...

  8. 生产者消费者模式-Java实现

    感知阶段 随着软件业的发展,互联网用户的日渐增多,并发这门艺术的兴起似乎是那么合情合理.每日PV十多亿的淘宝,处理并发的手段可谓是业界一流.用户访问淘宝首页的平均等待时间只有区区几秒,但是服务器所处理 ...

  9. KVO 使用及原理

    KVO的基本原理大概是这样的   当一个对象被观察时, 系统会新建一个子类NSNotifying_A ,在子类中重写了对象被观察属性的 set方法,  并且改变了该对象的 isa 指针的指向(指向了新 ...

  10. GTP

     GPRS隧道协议(GPRS Turning Protocol) GTP是一个高层协议,位于TCP/IP或UDP/IP等协议上,提供主机间端到端通信, 通过隧道标志(TEI)在路径协议上复用  GTP ...