zoukankan      html  css  js  c++  java
  • Android 相对布局

    1. <?xml version="1.0" encoding="utf-8"?>  
    2.   
    3. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"  
    4.     android:layout_width="fill_parent"  
    5.     android:layout_height="wrap_content"  
    6.     android:padding="10px"  
    7.     >  
    8.     <TextView  
    9.         android:id="@+id/lable"  
    10.         android:text="Type here:"  
    11.         android:layout_width="fill_parent"  
    12.         android:layout_height="wrap_content"  
    13.     />  
    14.       
    15.     <EditText  
    16.         android:id="@+id/entry"  
    17.         android:layout_width="fill_parent"  
    18.         android:layout_height="wrap_content"  
    19.         android:background="@android:drawable/editbox_background"  
    20.         android:layout_below="@id/lable"  
    21.     />  
    22.       
    23.     <Button  
    24.         android:id="@+id/ok"  
    25.         android:layout_width="wrap_content"  
    26.         android:layout_height="wrap_content"  
    27.         android:text="OK"  
    28.         android:layout_below="@id/entry"  
    29.         android:layout_marginLeft="10px"  
    30.         android:layout_alignParentRight="true"  
    31.     />  
    32.       
    33.     <Button  
    34.         android:id="@+id/cancel"  
    35.         android:layout_width="wrap_content"  
    36.         android:layout_height="wrap_content"  
    37.         android:layout_toLeftOf="@id/ok"  
    38.         android:layout_alignTop="@id/ok"  
    39.         android:text="Cancel"  
    40.     />  
    41. </RelativeLayout> 

     

     

     

  • 相关阅读:
    网络编程
    Ant path 匹配原则
    Android Html.fromhtml
    android AsyncTask
    Android 系统联系人相关URI
    Android 学习心得体会
    中国天气网api(json格式)
    android:textAppearance
    Android COLLATE LOCALIZED ASC
    Android 快递接口
  • 原文地址:https://www.cnblogs.com/dLong/p/2516951.html
Copyright © 2011-2022 走看看