Android记账本界面实现
<!--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记账本界面实现的更多相关文章
- 解决Android Graphical Layout 界面效果不显示
解决Android Graphical Layout 界面效果不显示 qq463431476
- Android之拨号界面图片风格,无信息默认显示界面修改
Android之拨号界面图片风格,无信息默认显示界面修改 点开Dialer app,出现拨号,联系人,收藏三个选项卡,也就是三个Fragment,在三个界面都没有信息的时候会显示一个时钟,联系人,收藏 ...
- Android实现入门界面布局
Android实现入门界面布局 开发工具:Andorid Studio 1.3 运行环境:Android 4.4 KitKat 代码实现 首先是常量的定义,安卓中固定字符串应该定义在常量中. stri ...
- Android的配置界面PreferenceActivity
我想大家对于android的系统配置界面应该不会陌生吧,即便陌生,那么下面的界面应该似曾相识吧,假若还是不认识,那么也没有关系,我们这一节主要就是介绍并讲解android 中系统配置界面的使用,相信大 ...
- 图解android开发在界面上显示图片
图解android开发在界面上显示图片<申明:转自百度> <原文章地址:http://jingyan.baidu.com/article/49711c6153a277fa441b7c ...
- Android——实现欢迎界面的自动跳转(转)
Android实现欢迎界面的自动跳转,就是打开某一个安卓手机应用,出现的欢迎界面停留几秒钟,自动进入应用程序的主界面.在网上看到很多种实现办法,但是感觉这种方法还是比较简单的. 在onCreate里设 ...
- 二、Android应用的界面编程(七)ViewAnimator及其子类[ ViewSwitcher、ImageSwitcher、TextSwitcher、ViewFlipper ]
ViewAnimator是一个基类,它继承了FrameLayout.因此它表现出FrameLayout的特征,可以将多个View组“叠”在一起. ViewAnimator可以在View切换时表现出动画 ...
- Android开发自学笔记(Android Studio)—4.界面编程与View组件简单介绍
一.引言 Android应用开发最重要的一份内容就是界面的开发,无论你程序包含的内容多么优秀,如若没有一个良好的用户交互界面,最终也只是会被用户所遗弃.Android SDK提供了大量功能丰富的UI组 ...
- Android 设置启动界面
启动界面的意义是为了让后台处理耗时的复杂工作,当工作处理完成后,即可进入主界面.相比让用户等待布局加载完成,使用一张图片作为启动背景,会带来更好的体验. 首先,需要建立一个简单的布局: <?xm ...
- Android实现Banner界面广告图片循环轮播(包括实现手动滑动循环)
前言:经常会看到有一些app的banner界面可以实现循环播放多个广告图片和手动滑动循环.本以为单纯的ViewPager就可以实现这些功能.但是蛋疼的事情来了,ViewPager并不支持循环翻页.所以 ...
随机推荐
- django中一些快捷函数
1.get_object_or_404() 接收两个参数,参数1为模型类,参数2为查询参数 查询到对象则返回对象,查询不到则返回http404,但是不会返回模型的DoesNotExist异常 示例: ...
- java学生管理系统(界面版)
运行截图 项目说明: 本系统界面我个人就从简设计了,本来打算使用windowbuilder插件设计的,可想到使用windowbuilder插件之后导致代码冗余,会影响到代码可读性,可能对小白不友好.虽 ...
- VMware虚拟机Ubuntu系统连接网络过程
网络和Internet设置--高级网络设置--更多网络适配器选项--WLAN. 右键选择属性--共享,勾选允许连接,选择VMnet8.(若勾选了其它,之后再想换回来,可以先取消勾选,点确定,再进入勾选 ...
- ASP.NET Core 应用(SignalR)发布到 IIS 报错(HTTP Error 500.19 - Internal Server Error)
参考资料: ASP.NET Core SignalR 入门 将 ASP.NET Core 应用发布到 IIS Download .NET Core 报错信息: HTTP Error 500.19 - ...
- 【Azure App Service】App Service设置访问限制后,使用git clone代码库出现403报错
问题描述 在App Service中,为App Service配置了访问限制,结果导致在克隆App Service的代码时候,遇见403错误. 问题解答 因为在使用 git clone App Ser ...
- 【Azure Redis】Redis导入备份文件(RDB)失败的原因
问题描述 在测试Azure Redis的导入/导出备份文件的功能中,突然发现在Redis 4.0上导入的时候,一直报错. 问题解答 因为门户上只是显示导入失败,没有任何错误消息说明.根据常理推断,Re ...
- 【Azure 存储服务】Azure Blob Storage SDK 升级失败,遇见 Unsatisfied Dependency Exception 和 Unexpected Length Exception
问题描述 在升级Java Azure Blob Storage SDK的过程中,先后遇见了 UnsatisfiedDependencyException 和 UnexpectedLengthExcep ...
- Educational Codeforces Round 158 (Rated for Div. 2)C. Add, Divide and Floor(思维/数学)
C. Add, Divide and Floor 这里我们选择固定最小数不变,然后每次让其他数向最小数靠近,模拟一下可以发现,只要最大值变为和最小值一样,其他都会和最小值一样. #include &l ...
- Learning by teaching --- 费曼学习法
世界上存在成千上万种学习法,如果上天只让我掌握一种,那一定就是"费曼学习法". 介绍 费曼学习法是由诺贝尔物理学奖获得者理查德·费曼提出的一种学习方法,其核心思想是将所学内容用自己 ...
- foundation部分学习记录(更正更新中……)
foundation部分学习记录(更新中--) 从FDB的角度看,它对上层只提供有序+事务+KV存储的抽象. 设计原则 模块化分割,尽量细分且模块之间相互解耦 例如事务系统内,其提交(write pa ...