zoukankan      html  css  js  c++  java
  • 家庭记账本(一)

    今日进度:

    首先是设计页面:

    activity_main.xml:

    <?xml version="1.0" encoding="utf-8"?>
    <androidx.coordinatorlayout.widget.CoordinatorLayout
        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"
        tools:context=".MainActivity">
    
        <com.google.android.material.appbar.AppBarLayout
            android:layout_height="wrap_content"
            android:layout_width="match_parent"
            android:theme="@style/AppTheme.AppBarOverlay">
    
            <androidx.appcompat.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                android:background="?attr/colorPrimary"
                app:popupTheme="@style/AppTheme.PopupOverlay" />
    
        </com.google.android.material.appbar.AppBarLayout>
    
        <include layout="@layout/content_main"/>
    
    </androidx.coordinatorlayout.widget.CoordinatorLayout>

    content_main.xml:

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"
        tools:showIn="@layout/activity_main"
        tools:context=".MainActivity">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@color/cardview_dark_background"
            android:text="--------------账单如下-------------"
            android:textSize="20dp" />
    
        <ListView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/lv_main"/>
    
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true">
    
            <TextView
                android:id="@+id/tv_cost_total"
                android:layout_width="70dp"
                android:layout_height="96dp"
                android:text="余额:0.00"
                android:textSize="20dp" />
    
            <Button
                android:id="@+id/btn_add_in"
                android:layout_height="match_parent"
                android:layout_width="0dp"
                android:layout_weight="1"
                android:background="#ffe4e6"
                android:drawablePadding="10dp"
                android:gravity="center"
                android:text="添加收入" />
    
            <Button
                android:id="@+id/btn_add_out"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="#ffe4e6"
                android:drawablePadding="10dp"
                android:gravity="center"
                android:text="添加支出" />
    
            <Button
                android:id="@+id/btn_delete"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="#ffe4e6"
                android:drawablePadding="10dp"
                android:gravity="center"
                android:text="删除账单" />
    
    
        </LinearLayout>
    
    </RelativeLayout>

  • 相关阅读:
    如何使不同时区的时间与京8区一致?(JS实现)
    再论递归
    如何实现keep-alive
    [小tips]使用vscode,根据vue模板文件生成代码
    gulp-load-task 解决 gulpfile.js 过大的问题
    《Vue 编程房内考》
    前端开发笔试题汇总
    HTTP状态码及其含义 503 500 401 200 301 302
    IE, FF, Safari前端开发常用调试工具
    DOCTYPE与浏览器模式详解(标准模式&混杂模式)
  • 原文地址:https://www.cnblogs.com/marr/p/14902447.html
Copyright © 2011-2022 走看看