<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    xmlns:app="http://schemas.android.com/apk/res-auto"    xmlns:tools="http://schemas.android.com/tools"    android:layout_width="match_parent"    android:layout_height="match_parent"    android:orientation="vertical"    tools:context=".MainActivity">    <LinearLayout        android:id="@+id/ll_1"        android:layout_width="200dp"        android:layout_height="200dp"        android:background="#000000"        android:orientation="vertical"        android:padding="20dp">        <View            android:layout_width="match_parent"            android:layout_height="match_parent"            android:background="#FF0033"/>    LinearLayout>    <LinearLayout        android:layout_width="match_parent"        android:layout_height="100dp"        android:orientation="horizontal"        android:background="#ccff99"        android:layout_marginTop="20dp"        android:layout_marginLeft="15dp"        android:layout_marginRight="15dp"        android:gravity="center">                                        <View            android:layout_width="50dp"            android:layout_height="50dp"            android:background="#ffffff"/>    LinearLayout>    <LinearLayout        android:layout_width="match_parent"        android:layout_height="100dp"        android:orientation="horizontal"        android:background="#ccff99"        android:layout_marginTop="20dp"        android:layout_marginLeft="15dp"        android:layout_marginRight="15dp">        <View            android:layout_width="0dp"            android:layout_height="50dp"            android:background="#000000"            android:layout_weight="1" />        <View            android:layout_width="0dp"            android:layout_height="50dp"            android:background="#FF0033"            android:layout_weight="1"/>    LinearLayout>LinearLayout>

线性布局练习_第1张图片

更多相关文章

  1. Android下QQ空间查看大图特效
  2. 【Android UI设计与开发】第09期:底部菜单栏(四)Fragment+PopupWind
  3. Android为Layout设置最大宽度
  4. Android获取屏幕的高度和宽度
  5. android之4.0控件switch自定义开关背景图片和控制宽度
  6. 更改系统给APP应用分配最大的内存空间
  7. android获取控件宽度
  8. android之获取手机安装包里面的信息、获取目录空间的大小

随机推荐

  1. android中的选择器selector
  2. 浅谈Android中的ClassLoader
  3. AppBarLayout中android:fitsSystemWindow
  4. 修改Android手机的“虚拟机堆大小”和and
  5. Android核心模块及相关技术
  6. Android性能调优出发点
  7. [入门四]Android核心模块及相关技术
  8. Android(安卓)调试桥
  9. mac里边配置android开发环境,intellij开发
  10. Android中ScrollView无法正常achartengin