zoukankan      html  css  js  c++  java
  • 家庭记账本App进程

    今天在昨天的基础上,相继完成了三个页面的布局和显示情况:

    新增加的xml文件如下:

    activity_add.xml:

    复制代码
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:gravity="center">
    
      <EditText
          android:id="@+id/et_cost_title"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_margin="4dp"
          android:hint="花费名称"/>
    
        <EditText
            android:id="@+id/et_cost_money"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="4dp"
            android:hint="花费金额"/>
    
        <DatePicker
            android:id="@+id/dp_cost_date"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="4dp"
            android:datePickerMode="spinner"
            android:calendarViewShown="false"/>
    
        <LinearLayout
            android:id="@+id/btn"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:layout_gravity="center"
            android:orientation="horizontal">
            <Button
                android:id="@+id/btn_return"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="返回"
                android:background="#87CEFA"
                android:layout_marginLeft="90dp"
                />
            <Button
                android:id="@+id/btn_go"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="确认"
                android:background="#87CEFA"
                android:layout_marginLeft="50dp" />
        </LinearLayout>
    
    
        </LinearLayout>
    复制代码

    activity_look.xml:

    复制代码
    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="80dp"
        android:orientation="vertical">
    
        <TextView
            android:id="@+id/tv_title"
            android:layout_width="150dp"
            android:layout_height="80dp"
            android:layout_marginLeft="10dp"
            android:layout_alignParentLeft="true"
            android:gravity="center"
            android:singleLine="true"
            android:textSize="30sp"
            android:ellipsize="marquee"
            android:text="花费名称"/>
    
        <TextView
            android:id="@+id/tv_data"
            android:layout_width="wrap_content"
            android:layout_height="80dp"
            android:gravity="center"
            android:textSize="20sp"
            android:layout_marginLeft="15dp"
            android:layout_toRightOf="@id/tv_title"
            android:text="花费日期"/>
    
        <TextView
            android:id="@+id/tv_cost"
            android:layout_width="wrap_content"
            android:layout_height="80dp"
            android:gravity="center"
            android:layout_alignParentRight="true"
            android:layout_marginRight="20dp"
            android:text="00.00"
            android:textSize="25sp"/>
    </RelativeLayout>
    复制代码

    activity_setting.xml:

    复制代码
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
    
        <TextView
            android:id="@+id/usname"
            android:layout_marginTop="100dp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:padding="10dp"
            android:text="账户名:"
            android:textColor="#000"
            android:textSize="20dp" />
        <EditText
            android:id="@+id/usname_"
            android:layout_alignBottom="@+id/reg_number1"
            android:layout_toRightOf="@+id/reg_number1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="请输入账户名"
            android:padding="10dp" />
    
        <TextView
            android:layout_marginTop="60dp"
            android:id="@+id/reg_number1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:padding="20dp"
            android:text="密码:"
            android:textColor="#000"
            android:textSize="20dp" />
        <EditText
            android:layout_alignBottom="@+id/reg_number1"
            android:layout_toRightOf="@+id/reg_number1"
            android:id="@+id/reg_username"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="请输入密码:"
            android:padding="10dp" />
    
        <LinearLayout
            android:id="@+id/btn_setting_"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="50dp"
            android:layout_gravity="center"
            android:orientation="horizontal">
            <Button
                android:id="@+id/btn_return"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="更改密码"
                android:background="#87CEFA"
                android:layout_marginLeft="90dp"
                />
            <Button
                android:id="@+id/btn_go"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="退出登录"
                android:background="#87CEFA"
                android:layout_marginLeft="50dp" />
        </LinearLayout>
    
    </LinearLayout>
    复制代码

    运行结果:

  • 相关阅读:
    不重复随机数生成
    centos 输入密码正确进不去系统
    程序退出异常_DebugHeapDelete和std::numpunct
    iptables导致数据包过多时连接失败
    linux服务器并发与tcmalloc
    Windows server 2008 被ntlmssp安装攻击 解决
    转载 html div三列布局占满全屏(左右两列定宽或者百分比、中间自动适应,div在父div中居底)
    WIN2003使用IP安全策略只允许指定IP远程桌面连接
    如何让电脑公司Win7系统自动关闭停止响应的程序
    win7 64的系统安装。net4.0总是提示安装未成功
  • 原文地址:https://www.cnblogs.com/hrzgj/p/14913375.html
Copyright © 2011-2022 走看看