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并不支持循环翻页.所以 ...
随机推荐
- DFS算法模板(2488:A Knight's Journey)
DFS算法(C++版本) 题目一: 链接:http://bailian.openjudge.cn/practice/2488/ 解析思路: 骑士找路就是基本的DFS,用递归不断找到合适的路,找不到就回 ...
- Qt实用技巧:Qt从QtCreator更换为VS开发Qt所需要注意的坑
前言 基本都是使用QtCreator开发,使用vs进行一下开发,记录从QtCreator换成VS所遇到的注意的坑. VS装对应的Qt版本助手配置Qt版本 VS装番茄助手 这里 ...
- 运行Study.Trade模块的Web.Unified.Host
1.把Web.Host的项目设置为启动项目 上一篇文章报错,因为npm功能没有安装,导致Web.Unified.Host的wwwroot下没有libs目录. 2.默认是在IIS Express中承载 ...
- Nebula Graph 在众安保险的图实践
本文首发于 Nebula Graph Community 公众号 互联网金融的借贷同传统信贷业务有所区别,相较于传统信贷业务,互联网金融具有响应快.数据规模大.风险高等特点.众安保险主要业务是做信用保 ...
- [java] Tomcat 启动失败 Error: error while reading constant pool for .class: unexpected tag at #
表现 公司服务器今天启动tomcat失败, 看catalina.out文件里面报错 java.lang.ClassFormatError: Unknown constant tag 101 in cl ...
- C++ //类模板与函数模板的区别 //1.类模板没有自动类型推导的使用方式 //2.类模板子模板参数中可以有默认参数
1 //类模板与函数模板的区别 2 //1.类模板没有自动类型推导的使用方式 3 //2.类模板子模板参数中可以有默认参数 4 5 #include <iostream> 6 #inclu ...
- 使用 Docker 部署 File Browser 文件管理系统
1)File Browser 介绍 官网:https://filebrowser.org/ GitHub:https://github.com/filebrowser/filebrowser 今天为大 ...
- 魅族16T屏幕尺子
- 关于debian11无法安装星火商店的解决方法
#!/bin/bash if [ "$(id -u)" != "0" ] then echo "请确保你使用root权限启动此脚本" exi ...
- 基于恒玄WT250芯片的蓝牙辅听耳机方案调试总结
前记 在蓝牙辅听领域卷了几年之后.各种型号的蓝牙辅听器都做过.这次,客户需要一款性价比超高的蓝牙辅听器.经过成本以及功能考量的筛选.最终定下来使用wt250来做一款低成本的蓝牙辅听器. 硬件部分 wt ...