家庭记账本APP(3)

确立基本功能:

1)打开app,会有添加记录、查看记录两个按钮:

点击“添加记录”,即可转跳到添加记录页面,点击“查看记录”,即可转跳到查看记录页面。

 

(2)在添加记录页面,可以输入金额以及收支备注,选择收入或者支出,点击“提交”按钮,即可保存记录。

 

(3)在查看页面,即可查看之前保存的数据。

主页面源代码:

<?xml version="1.0" encoding="UTF-8"?>

-<androidx.constraintlayout.widget.ConstraintLayout tools:context=".MainActivity" android:background="@drawable/bg" android:layout_height="match_parent" android:layout_width="match_parent" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android">


-<ScrollView android:layout_height="match_parent" android:layout_width="match_parent">

<LinearLayout android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/linearlayout" android:orientation="vertical"> </LinearLayout>

</ScrollView>

</androidx.constraintlayout.widget.ConstraintLayout>

  效果图:

 

 

 

posted @ 2021-01-18 15:44  小跳不磕脑袋  阅读(37)  评论(0编辑  收藏  举报