zoukankan      html  css  js  c++  java
  • 进度2_家庭记账本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>

    运行结果:

  • 相关阅读:
    MySql日期与时间函数
    Redis内存分析工具redis-rdb-tools
    MYSQL5.7脚本运行时出现[Warning] Using a password on the command line interface can be insecure
    Prometheus
    Shopt命令(删除排除)
    Nginx配置跨域支持功能
    Nginx之 try_files 指令
    Grafana使用阿里云短信的报警实现
    用python发送短消息(基于阿里云平台)
    同步pod时区与node主机保持一致
  • 原文地址:https://www.cnblogs.com/hhjing/p/12264705.html
Copyright © 2011-2022 走看看