Android 菜鸟开发A-02-01———LinearLayout线性布局

每一只菜鸟都能飞天,站在巅峰傲视群雄


第一章:符号体系

1.1  核心词:


w1-LinearLayout -先(线)划分一个人的性别,再布置出局的人

line-线  

ar-一个人 的性别 

lay-放置,布置

out-出局

 

w2-orientation-神找不到欧日俄的方向,这是个难题

orie-欧日俄

nt-难题

ation-神

 

w3-vertical-我睡(垂)醒直接去听课

ver-我

ti-听

cal-课

 

w4-horizontal-对面很横的情况下,红日总是投降

hori-红日

zon-总是

tol-投

 

 

 

1.2  核心概念

android:orientation 属性指定布局方向

 

 

第二章 : 序斩

s1-选择Activity布局为LinearLayout

s2-选择orientation为 vertical  or   horizontol

s3-拖拽EditText跟Button控件

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="16dp"
    android:paddingRight="16dp"
    android:orientation="vertical" >
    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="@string/to" />
    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="@string/subject" />
    <EditText
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:gravity="top"
        android:hint="@string/message" />
    <Button
        android:layout_width="100dp"
        android:layout_height="wrap_content"
        android:layout_gravity="right"
        android:text="@string/send" />
</LinearLayout>

第三章 : 练习
 

线性布局嵌套   外围 vertical  内部 horizontol    各1个edittext  1个button

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值