<!--activity_main.xml-->
1 <?xml version="1.0" encoding="utf-8"?>
2 <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 xmlns:app="http://schemas.android.com/apk/res-auto"
4 xmlns:tools="http://schemas.android.com/tools"
5 android:layout_width="match_parent"
6 android:layout_height="match_parent"
7 tools:context=".MainActivity">
8
9 <com.google.android.material.appbar.AppBarLayout
10 android:layout_width="match_parent"
11 android:layout_height="wrap_content"
12 android:theme="@style/Theme.Mooc.AppBarOverlay">
13
14 <androidx.appcompat.widget.Toolbar
15 android:id="@+id/toolbar"
16 android:layout_width="match_parent"
17 android:layout_height="?attr/actionBarSize"
18 android:background="?attr/colorPrimary"
19 app:popupTheme="@style/Theme.Mooc.PopupOverlay" />
20
21 </com.google.android.material.appbar.AppBarLayout>
22 <include layout="@layout/content_main" />
23
24 <com.google.android.material.floatingactionbutton.FloatingActionButton
25 android:id="@+id/fab"
26 android:layout_width="wrap_content"
27 android:layout_height="wrap_content"
28 android:layout_gravity="bottom|end"
29 android:layout_margin="@dimen/fab_margin"
30 app:srcCompat="@android:drawable/ic_dialog_info" />
31 </androidx.coordinatorlayout.widget.CoordinatorLayout>


 <!--content_main.xml-->
1 <?xml version="1.0" encoding="utf-8"?>
2 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 xmlns:app="http://schemas.android.com/apk/res-auto"
4 android:layout_width="match_parent"
5 android:layout_height="match_parent"
6 app:layout_behavior="@string/appbar_scrolling_view_behavior">
7
8 <fragment
9 android:id="@+id/nav_host_fragment"
10 android:name="androidx.navigation.fragment.NavHostFragment"
11 android:layout_width="0dp"
12 android:layout_height="0dp"
13 app:defaultNavHost="true"
14 app:layout_constraintBottom_toBottomOf="parent"
15 app:layout_constraintLeft_toLeftOf="parent"
16 app:layout_constraintRight_toRightOf="parent"
17 app:layout_constraintTop_toTopOf="parent"
18 app:navGraph="@navigation/nav_graph" />
19 <ListView
20 android:layout_width="match_parent"
21 android:layout_height="match_parent"
22 android:id="@+id/lv_main"
23 />
24 </androidx.constraintlayout.widget.ConstraintLayout>

 <!--list_item.xml-->

1 <?xml version="1.0" encoding="utf-8"?>
2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:layout_width="match_parent"
4 android:layout_height="match_parent">
5 <TextView
6 android:id="@+id/tv_title"
7 android:layout_width="100dp"
8 android:layout_height="80dp"
9 android:layout_marginLeft="10dp"
10 android:gravity="center"
11 android:singleLine="true"
12 android:textSize="20sp"
13 android:ellipsize="marquee"
14 android:text="costTitle"
15 />
16 <TextView
17 android:id="@+id/tv_date"
18 android:layout_width="wrap_content"
19 android:layout_height="80dp"
20 android:gravity="center"
21 android:textSize="20sp"
22 android:layout_marginLeft="25dp"
23 android:layout_toRightOf="@+id/tv_title"
24 android:text="costDate"
25 />
26
27 <TextView
28 android:layout_width="wrap_content"
29 android:layout_height="80dp"
30 android:id="@+id/tv_cost"
31 android:layout_alignParentRight="true"
32 android:textSize="39sp"
33 android:text="60"
34 />
35 </RelativeLayout>

Android记账本界面实现的更多相关文章

  1. 解决Android Graphical Layout 界面效果不显示

    解决Android Graphical Layout 界面效果不显示 qq463431476

  2. Android之拨号界面图片风格,无信息默认显示界面修改

    Android之拨号界面图片风格,无信息默认显示界面修改 点开Dialer app,出现拨号,联系人,收藏三个选项卡,也就是三个Fragment,在三个界面都没有信息的时候会显示一个时钟,联系人,收藏 ...

  3. Android实现入门界面布局

    Android实现入门界面布局 开发工具:Andorid Studio 1.3 运行环境:Android 4.4 KitKat 代码实现 首先是常量的定义,安卓中固定字符串应该定义在常量中. stri ...

  4. Android的配置界面PreferenceActivity

    我想大家对于android的系统配置界面应该不会陌生吧,即便陌生,那么下面的界面应该似曾相识吧,假若还是不认识,那么也没有关系,我们这一节主要就是介绍并讲解android 中系统配置界面的使用,相信大 ...

  5. 图解android开发在界面上显示图片

    图解android开发在界面上显示图片<申明:转自百度> <原文章地址:http://jingyan.baidu.com/article/49711c6153a277fa441b7c ...

  6. Android——实现欢迎界面的自动跳转(转)

    Android实现欢迎界面的自动跳转,就是打开某一个安卓手机应用,出现的欢迎界面停留几秒钟,自动进入应用程序的主界面.在网上看到很多种实现办法,但是感觉这种方法还是比较简单的. 在onCreate里设 ...

  7. 二、Android应用的界面编程(七)ViewAnimator及其子类[ ViewSwitcher、ImageSwitcher、TextSwitcher、ViewFlipper ]

    ViewAnimator是一个基类,它继承了FrameLayout.因此它表现出FrameLayout的特征,可以将多个View组“叠”在一起. ViewAnimator可以在View切换时表现出动画 ...

  8. Android开发自学笔记(Android Studio)—4.界面编程与View组件简单介绍

    一.引言 Android应用开发最重要的一份内容就是界面的开发,无论你程序包含的内容多么优秀,如若没有一个良好的用户交互界面,最终也只是会被用户所遗弃.Android SDK提供了大量功能丰富的UI组 ...

  9. Android 设置启动界面

    启动界面的意义是为了让后台处理耗时的复杂工作,当工作处理完成后,即可进入主界面.相比让用户等待布局加载完成,使用一张图片作为启动背景,会带来更好的体验. 首先,需要建立一个简单的布局: <?xm ...

  10. Android实现Banner界面广告图片循环轮播(包括实现手动滑动循环)

    前言:经常会看到有一些app的banner界面可以实现循环播放多个广告图片和手动滑动循环.本以为单纯的ViewPager就可以实现这些功能.但是蛋疼的事情来了,ViewPager并不支持循环翻页.所以 ...

随机推荐

  1. 如何获取oracle dbid

    1.查询v$database获得 由于DBID在控制文件和数据文件中都存在记录,所以如果能够mount数据库就可以查询v$database视图获得.  SQL> alter database m ...

  2. Java I/O 教程(九) FileWriter和FileReader

    FileWriter Java FileWriter 用于往文件中写入字符数据. 不像FileOutputStream类,你无需转换字符串成字节数组,因为它提供了直接写字符串的方法. 类定义 publ ...

  3. 实操开源版全栈测试工具RunnerGo安装(二)Linux安装

    手动安装(支持Linux.MacOS.Windows) Linux安装步骤 以debian系统为例,其他linux系统参考官方文档:https://docs.docker.com/engine/ins ...

  4. windows 上 cmake 添加 vcpkg 选项

    使用 cmake 编写相关的工程时,工程有时会使用 vcpkg 添加的第三方库,比如 zip 库 查看一些案例后,我发现有些回答不太准确,遂记录下 现在,我们需要在工程中使用 zip_open 函数执 ...

  5. 【LeetCode二叉树#07】左叶子节点之和(基于栈的迭代法前中后序遍历复习)

    左叶子节点之和 力扣题目链接(opens new window) 计算给定二叉树的所有左叶子之和. 示例: 思路 注意审题,这里是要求 左叶子节点 之和 不是二叉树中的左侧节点之和,因此使用层序遍历是 ...

  6. 【Azure Redis】PHPRedis遇见SSL Connection Timeout问题

    问题描述 PHP Redis客户端遇见使用SSL Connection timeout,遇见问题后,切换回去Non-SSL没有出现问题.但是切换回SSL后,还是偶尔遇见Connection timeo ...

  7. 【Azure 服务总线】Spring Cloud 的应用 使用Service Bus 引起 org.springframework.beans.BeanInstantiationException 异常,无法启动

    问题描述 Spring Cloud 的应用原本正常运行,但是重新发布了一次应用后,发现使用 Service Bus 服务的应用都无法启动并报 BeanInstantiationException  异 ...

  8. [Python] 子线程退出孙线程不退出

    遇到了一个大坑! 如图,在子线程ThreadFunc退出之后,ThreadFunc2依旧在运行... 根本不会结束 但是官方文档中说明了,只要设置了daemon不为None 就能设置子线程是守护线程, ...

  9. MYSQL中正则表达式检索数据库

    1.MySQL中使用通配符检索数据库,之外还可以使用正则表达式来检索数据. 使用通配符   '_'  和   '%'的区别如下,   使用通配符的技巧:一般的来说 通配符可以处理数据,但是消耗内存较大 ...

  10. vscode 注释后 光标下移(注释后光标快速定位下一行) 仿照idea

    VSCode 注释后光标快速定位下一行 1. 安装插件 Multi-command Multi-command 2.打开 Keybinding.json Keybinding.json 左下角齿轮图标 ...