美文网首页
安卓 Android LinearLayout 线性布局

安卓 Android LinearLayout 线性布局

作者: 已经多年不写Unity | 来源:发表于2019-02-21 11:51 被阅读0次

线性布局:引入一个新的权重概念 使界面等比例分割更容易。


屏幕快照 2019-02-21 下午2.37.23.png
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/line1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">

<LinearLayout
    android:layout_width="0dp"
    android:layout_height="fill_parent"
    android:background="#ADFF2F"
    android:layout_weight="1"/>


<LinearLayout
    android:layout_width="0dp"
    android:layout_height="fill_parent"
    android:background="#DA70D6"
    android:layout_weight="2"/>

<LinearLayout
    android:background="@color/colorPrimaryDark"
    android:layout_width="0dp"
    android:layout_height="100dp"
    android:layout_weight="5"
    />

</LinearLayout>

相关文章

  • 基础篇

    学习了安卓布局:LinearLayout(线性布局) RelativeLayout(相对布局)

  • 安卓 Android LinearLayout 线性布局

    线性布局:引入一个新的权重概念 使界面等比例分割更容易。

  • 初识安卓之LinearLayout线性布局

    0.前言 在安卓的多种布局方式中,LinearLayout(线性布局)和RelativeLayout(相对布局)算...

  • 【Android】安卓布局知识点

    前言:安卓六大布局 线性布局(LinearLayout):按照垂直或者水平方向布局的组件 相对布局(Relativ...

  • 安卓中的布局

    安卓布局类型Framelayout:子元素没有位置概念,向左上角对齐Linearlayout:线性布局,水平垂直两...

  • 2020-10-06

    Android常见界面布局:RelativeLayout(相对布局) LinearLayout(线性...

  • Android - 4种基本布局

    1.线性布局 LinearLayout:线性布局 EditText 和 Button 的 android:layo...

  • Android控件

    vertial 水平horizontal 垂直 布局 : LinearLayout 线性布局android:l...

  • 布局管理

    LinearLayout(线性布局) 基本属性: ①android:orientation android:ori...

  • Android的Layout --- 布局

    UILayout LinearLayout 线性布局 默认android:orientation="horizon...

网友评论

      本文标题:安卓 Android LinearLayout 线性布局

      本文链接:https://www.haomeiwen.com/subject/uslryqtx.html