zoukankan      html  css  js  c++  java
  • 各种布局layout

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width
    ="fill_parent"
        android:layout_height
    ="fill_parent"
        android:orientation
    ="vertical" >
        <TextView
            
    android:layout_width="fill_parent"
            android:layout_height
    ="wrap_content"
            android:text
    ="@string/hello" />
        
      
          <RelativeLayout
            
    android:layout_width="fill_parent"
            android:layout_height
    ="wrap_content"  >    
            
            <TextView
            
    android:id="@+id/textView1"
            android:layout_width
    ="100dp"
            android:layout_height
    ="wrap_content"
            android:text
    ="@string/plaseInputPhoneNumber" />
            <EditText
                
    android:id="@+id/editText1"
                android:layout_width
    ="match_parent"
                android:layout_height
    ="wrap_content" 
                android:layout_toRightOf
    ="@id/textView1"
                android:layout_alignTop
    ="@id/textView1"
                android:layout_marginLeft
    ="5dp"
                
    >            
            </EditText>
         </RelativeLayout>   
        <TextView
            
    android:id="@+id/textView2"
            android:layout_width
    ="wrap_content"
            android:layout_height
    ="wrap_content"
            android:text
    ="@string/plaseInputSMS" />
        <EditText
            
    android:id="@+id/editText2"
            android:layout_width
    ="match_parent"
            android:layout_height
    ="wrap_content" />
        <TableLayout
            
    android:layout_width="fill_parent"
            android:layout_height
    ="wrap_content" 
            
    >
            <TableRow>
             <Button
                 
    android:id="@+id/button1"
                 android:layout_width
    ="wrap_content"
                 android:layout_height
    ="wrap_content"
                 android:text
    ="@string/Button" />
        
             <Button
                 
    android:id="@+id/button2"
                 android:layout_width
    ="wrap_content"
                 android:layout_height
    ="wrap_content"
                 android:text
    ="@string/Button1" />
             </TableRow>
         </TableLayout>
         <FrameLayout 
              
    android:layout_width="fill_parent"
            android:layout_height
    ="wrap_content" 
             
    >
             <ImageView 
                  
    android:layout_width="fill_parent"
                android:layout_height
    ="fill_parent" 
                android:src
    ="@drawable/move"
                 
    />
              <ImageView 
                  
    android:layout_width="fill_parent"
                android:layout_height
    ="wrap_content" 
                android:src
    ="@drawable/btn"
                android:layout_gravity
    ="center"
                 
    />
             
         </FrameLayout>
    </LinearLayout>

    ---上面代码实现的界面 

     

  • 相关阅读:
    Mysql实战面试题
    初探Google Guava
    Spring IOC核心源码学习
    用3句话像老太太讲清楚什么是数据库
    matlab如何读入mat型的矩阵
    工作记忆数据处理
    功能连接
    奖励学习
    格兰杰因果关系及其在医学影像数据中的应用
    GC wm
  • 原文地址:https://www.cnblogs.com/kuailewangzi1212/p/2607510.html
Copyright © 2011-2022 走看看