zoukankan      html  css  js  c++  java
  • Android 笔记一:线性布局

    建立布局

    新建项目后,在如图路径下新建xml文件可以开始编辑

    weight的使用

    android:layout_width="0dp",或android:layout_width="wrap_content"
    之后在设置layout_weight即可

    
     <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:tools="http://schemas.android.com/tools"
            android:id="@+id/LinearLayout1"
            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="1"/>
    
        </LinearLayout>
    

    效果如图:

    android:layout_width="wrap_content"

    同上

  • 相关阅读:
    Git简介
    git 目录
    版本控制系统介绍
    python 爬虫 基于requests模块发起ajax的post请求
    python 爬虫 基于requests模块发起ajax的get请求
    POJ 2575
    POJ 2578
    POJ 2562
    POJ 2572
    POJ 2560
  • 原文地址:https://www.cnblogs.com/YuQiao0303/p/9804523.html
Copyright © 2011-2022 走看看