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>

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

     

  • 相关阅读:
    Sqlsugar中使用Codefrist创建数据库
    EFCore中CoreFrist多个上下文
    高并发
    优先级反转
    二叉树算法
    使用AJAX上传图片
    Entity Framework
    .Net面试题
    LC 1515. Best Position for a Service Centre (Simulated Annealing)
    git
  • 原文地址:https://www.cnblogs.com/kuailewangzi1212/p/2607510.html
Copyright © 2011-2022 走看看