zoukankan      html  css  js  c++  java
  • Android入门之相对布局(RelativeLayout)

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:padding="30dp"
        >
        <TextView
            android:id="@+id/lableView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="登陆界面" />
        
        <EditText 
            android:id="@+id/usernameText"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentRight="true"
            android:hint="username"
            android:layout_below="@id/lableView"/>
        
        <EditText 
            android:id="@+id/passwordText"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignLeft="@id/usernameText"
            android:layout_alignRight="@id/usernameText"
            android:hint="password"
            android:inputType="textPassword"
            android:layout_below="@id/usernameText"/>
        
        <Button 
            android:id="@+id/cancelButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/passwordText"
            android:layout_alignParentRight="true"
            android:text="取消"
            />
        
        <Button 
            android:id="@+id/okButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignBottom="@id/cancelButton"
            android:layout_toLeftOf="@id/cancelButton"
            android:text="确定"/>
    
    </RelativeLayout>

    效果如下:


  • 相关阅读:
    Part 11 Search filter in AngularJS
    Part 10 AngularJS sort rows by table header
    Part 9 Sorting data in AngularJS
    Part 8 AngularJS filters
    Part 7Handling events in AngularJS
    Part 6 AngularJS ng repeat directive
    PHP单一入口应用程序概述
    SVN
    跨平台的.NET集成开发环境:MonoDevelop
    PHP中使用KindEditor
  • 原文地址:https://www.cnblogs.com/bbsno1/p/3278390.html
Copyright © 2011-2022 走看看