zoukankan      html  css  js  c++  java
  • android 学习

    weight属性

    wrap_content和match_parent

     1 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    
     2     xmlns:tools="http://schemas.android.com/tools"    
     3     android:id="@+id/LinearLayout1"    
     4     android:layout_width="match_parent"    
     5     android:layout_height="match_parent"  
     6     android:orientation="horizontal" >    
     7     
     8     <TextView    
     9         android:layout_weight="1"    
    10         android:layout_width="wrap_content"    
    11         android:layout_height="fill_parent"    
    12         android:text="one"     
    13         android:background="#98FB98"    
    14      />    
    15      <TextView    
    16         android:layout_weight="2"    
    17         android:layout_width="wrap_content"    
    18         android:layout_height="fill_parent"    
    19         android:text="two"     
    20         android:background="#FFFF00"    
    21      />    
    22      <TextView    
    23         android:layout_weight="3"    
    24         android:layout_width="wrap_content"    
    25         android:layout_height="fill_parent"    
    26         android:text="three"     
    27         android:background="#FF00FF"    
    28      />    
    29     
    30 </LinearLayout>
  • 相关阅读:
    H5新增属性02
    h5新增属性
    javascript基础
    多列布局和弹性盒模型详解
    边框图片+盒子倒影
    CSS新增边框属性
    css3选择器
    css3基础
    h5新增-2
    h5新增
  • 原文地址:https://www.cnblogs.com/Nojava/p/14891968.html
Copyright © 2011-2022 走看看