zoukankan      html  css  js  c++  java
  • 寒假学习day20

    今天使用Android的表格布局进行一个实例的开发。

    使用TableLayout来完成简单的登录界面,运行效果图如下:

    详细代码如下:

    <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"    
        xmlns:tools="http://schemas.android.com/tools"    
        android:id="@+id/TableLayout1"    
        android:layout_width="match_parent"    
        android:layout_height="match_parent"    
        tools:context=".MainActivity"     
        android:stretchColumns="0,3"    
        android:gravity="center_vertical"    
        android:background="#66FF66"    
        >    
            
        <TableRow>    
            <TextView />    
            <TextView     
                android:layout_width="wrap_content"    
                android:layout_height="wrap_content"    
                android:text="用户名:"/>    
            <EditText     
                android:layout_width="wrap_content"    
                android:layout_height="wrap_content"    
                android:minWidth="150dp"/>    
            <TextView />    
        </TableRow>    
            
        <TableRow>    
            <TextView />    
            <TextView     
                android:layout_width="wrap_content"    
                android:layout_height="wrap_content"    
                android:text="密  码:"        
            />    
            <EditText     
                android:layout_width="wrap_content"    
                android:layout_height="wrap_content"    
                android:minWidth="150dp"        
            />    
            <TextView />    
        </TableRow>    
            
        <TableRow>    
            <TextView />    
            <Button     
                android:layout_width="wrap_content"    
                android:layout_height="wrap_content"    
                android:text="登陆"/>    
            <Button    
                android:layout_width="wrap_content"    
                android:layout_height="wrap_content"    
                android:text="退出"/>    
            <TextView />    
        </TableRow>    
            
    </TableLayout>
  • 相关阅读:
    创建你的 /proc 文件
    在 /proc 里实现文件
    使用 /proc 文件系统
    printk函数速率限制
    printk函数打开和关闭消息
    printk 函数消息是如何记录的
    mysql存储程序
    Javascript 笔记与总结(1-1)作用域
    Java实现 LeetCode 142 环形链表 II(二)
    Java实现 LeetCode 142 环形链表 II(二)
  • 原文地址:https://www.cnblogs.com/lxywsx/p/14905797.html
Copyright © 2011-2022 走看看