• LinearLayout(线性布局)


     1 <?xml version="1.0" encoding="utf-8"?>
     2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     3     xmlns:tools="http://schemas.android.com/tools"
     4     android:id="@+id/LinearLayout1"
     5     android:layout_width="match_parent"
     6     android:layout_height="match_parent"
     7     android:orientation="vertical">
     8 
     9 
    10     <TextView
    11         android:id="@+id/textView2"
    12         android:layout_width="wrap_content"
    13         android:layout_height="wrap_content"
    14         android:layout_marginLeft ="10dp"
    15         android:layout_marginTop="10dp"
    16         android:textSize="20sp"
    17         android:text="@string/user_name" />
    18 
    19     <EditText
    20         android:layout_marginLeft ="10dp"
    21         android:layout_marginTop="10dp"
    22         android:textSize="20sp"
    23         android:id="@+id/editText2"
    24         android:layout_width="wrap_content"
    25         android:layout_height="wrap_content"
    26         android:ems="10"
    27         android:inputType="textPersonName" />
    28 
    29     <TextView
    30         android:layout_marginLeft ="10dp"
    31         android:layout_marginTop="10dp"
    32         android:textSize="20sp"
    33         android:id="@+id/textView3"
    34         android:layout_width="wrap_content"
    35         android:layout_height="wrap_content"
    36         android:text="@string/user_password" />
    37 
    38     <EditText
    39         android:layout_marginLeft ="10dp"
    40         android:layout_marginTop="10dp"
    41         android:textSize="20sp"
    42         android:id="@+id/editText3"
    43         android:layout_width="wrap_content"
    44         android:layout_height="wrap_content"
    45         android:ems="10"
    46         android:inputType="textPassword" />
    47 
    48     <Button
    49         android:layout_marginLeft ="10dp"
    50         android:layout_marginTop="10dp"
    51         android:textSize="20sp"
    52         android:id="@+id/button"
    53         android:layout_width="wrap_content"
    54         android:layout_height="wrap_content"
    55         android:text="@string/button" />
    56 </LinearLayout>
  • 相关阅读:
    linux配置虚拟机的网络服务
    js动态生成层方法 不懂得加QQ 2270312758
    js中let和var的区别 不懂得加QQ 2270312758
    C#特性详解
    (四)python之文件处理
    (三)python之字符编码
    (二)Python之数据类型
    (一)python基础
    (2)库相关操作
    (1)初始数据库
  • 原文地址:https://www.cnblogs.com/codecherry/p/10187841.html
Copyright © 2020-2023  润新知