zoukankan      html  css  js  c++  java
  • 安卓linearlayout布局的一个嵌套实例

    XML代码如下

    <?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:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal"
        tools:context="com.example.hjw.androiddaywork01.MainActivity">
        <LinearLayout
            android:orientation="vertical"
            android:layout_width="wrap_content"
            android:layout_height="match_parent">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/icon005"/>
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"/>
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/icon005"/>
        </LinearLayout>
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:background="@drawable/icon006"/>
    
        <LinearLayout
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="match_parent">
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/icon005"/>
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="0dp"
                android:layout_weight="2"
               />
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/icon005"/>
        </LinearLayout>
    
    
    
    
    </LinearLayout>
    善守者藏于九地之下, 善攻者动于九天之上
  • 相关阅读:
    (转)java反射机制及简单工厂模式
    (转)JAVA反射机制理解
    (转)前缀、中缀、后缀表达式
    (转)java提高篇(四)-----理解java的三大特性之多态
    (转)java for循环的执行顺序和几种常用写法
    (转)JAVA堆栈操作
    POI 实现合并单元格以及列自适应宽度
    前端缓存支持的文件格式及请求方式
    freemarker在xml文件中遍历list数据
    freemarker在线编辑
  • 原文地址:https://www.cnblogs.com/jiutiankunpeng/p/5481653.html
Copyright © 2011-2022 走看看