zoukankan      html  css  js  c++  java
  • 安卓开发

    学习了match_parent(fill_parent) 对其方式  match_parent表示让当前控件的大小和父布局的大小一样,也就是由父布局来决定当前控件的大小

    <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" >    
        
        <TextView    
            android:layout_weight="1"    
            android:layout_width="fill_parent"    
            android:layout_height="fill_parent"    
            android:text="one"     
            android:background="#98FB98"    
         />    
         <TextView    
            android:layout_weight="2"    
            android:layout_width="fill_parent"    
            android:layout_height="fill_parent"    
            android:text="two"     
            android:background="#FFFF00"    
         />    
         <TextView    
            android:layout_weight="3"    
            android:layout_width="fill_parent"    
            android:layout_height="fill_parent"    
            android:text="three"     
            android:background="#FF00FF"    
         />    
        
    </LinearLayout>
  • 相关阅读:
    java-Math类
    java-Random类
    java-SimpleDateFormat类
    java-Calendar类+
    java-Calendar类
    java-System类
    java-Integer的面试题
    Android中怎么用this
    adapter(转自Devin Zhang)
    实例变量和局部变量
  • 原文地址:https://www.cnblogs.com/20193898liufa/p/14884028.html
Copyright © 2011-2022 走看看