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并不支持循环翻页.所以 ...
随机推荐
- Vue实现静态列表增删查功能
知识点 1.双向数据绑定 2.自定义指令 3.自定义过滤器 4.v-for循环对象数组 5.ES6操作数组的新方法:forEach some filter findIndex 实现效果 页面源码 &l ...
- 解决SQLyog连接mysql报错:Your password has expired
解决步骤如下: D:\program\mysql-5.7.16-winx64\bin>mysql -uroot -p Enter password: ******* Welcome to the ...
- C++常用快读
1.快读相关代码 inline int read() { int x=0,f=0; char ch=getchar(); while(!isdigit(ch))f|=(ch=='-'),ch=getc ...
- 树莓派/Linux ubuntu 开机自动改网络mac地址(主要适用于拷贝内存卡的情况/不同树莓派mac地址不同)
树莓派/Linux ubuntu 开机自动改网络mac地址(主要适用于拷贝内存卡的情况/不同树莓派mac地址不同) yaml文件名根据自己原卡中名字更改 address=$(cat /sys/clas ...
- xcode真机运行包添加(更新到15.4)
今天给真机装包,提示xcode版本低不能安装,电脑内存有些不足,xcode更新不了,这时候了解到xcode可以单独添加开发包\(^o^)/~ 1.下载 链接: https://pan.baidu.co ...
- 海康摄像SDK开发笔记(一):海康威视网络摄像头SDK介绍与模块功能
前言 视频监控.人脸识别等应用中经常使用到摄像头,当前占据主流视频监控摄像头就是海康和大华两家,都可通过自家的sdk或者是onvif方式使用和控制摄像头. 本文章讲解海康的sdk方式. 海康 ...
- 【Azure API 管理】是否可以将Swagger 的API定义导入导Azure API Management中
问题描述 是否可以将Swagger 的API定义导入导Azure API Management中? 操作步骤 是的,可以通过APIM门户导入单个的API Swagger定义文件.具体步骤如下: 第一步 ...
- Choreographer原理
Android 系统在 VSYNC 信号的指引下,有条不紊地进行者每一帧的渲染.合成操作,使我们可以享受稳定帧率的画面.引入 VSYNC 之前的 Android 版本,渲染一帧相关的 Message ...
- android 混淆规则作用,Android代码混淆详解
一.混淆的意义 混淆代码并不是让代码无法被反编译,而是将代码中的类.方法.变量等信息进行重命名,把它们改成一些毫无意义的名字,同时也可以移除未被使用的类.方法.变量等. 所以直观的看,通过混淆可以提高 ...
- Java //内存解析