家庭版记账本app进度之编辑框组件
<EditText>中设置提示信息是用到的语句是android:hint来进行提示语句的书写。
android:inputType可以将此编辑框设置为输入密码的编辑框(现实的是小黑点)
android:drawableLeft属性来确定相应编辑框开始时候对应的头像。

除了在文字的左侧设置图片的,也可以在其他的地方进行图片的设置。
padding应用pd为单位
设置编辑框的文本行数android:lines这样的话当内容较多时。
android:gravity设置提示文字的的对其方式:
android:layout_marginBottom来设置外边距;
android:inputType="textMultiLine"这样来设置编辑框可以显示多行
制作出的添加小事件的程雪截图如图所示:

相应的主要是代码如下:
activity_main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="10dp"
android:background="@color/qianhui"
tools:context=".MainActivity"> <TextView
android:id="@+id/texnum1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="添加新的小事件"
android:textSize="30dp"
android:gravity="center_horizontal"
android:padding="5dp"
android:background="@color/baise"
android:layout_marginBottom="10dp"
/> <EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请输入新事件的标题"
android:lines="2"
android:padding="8dp"
android:background="@color/baise"
android:layout_marginBottom="10dp"
/> <EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请输入新事件的相关内容"
android:lines="15"
android:padding="8dp"
android:background="@color/baise"
android:layout_marginBottom="10dp"
android:gravity="top"
/> <LinearLayout
android:id="@+id/ll_date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="选择日期:"
android:padding="8dp"
android:background="@color/baise"
android:textSize="18sp" /> <TextView
android:id="@+id/tv_date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:background="@color/qianhuang"
android:textSize="18sp" /> </LinearLayout> <LinearLayout
android:id="@+id/ll_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal"> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="选择时间:"
android:padding="8dp"
android:background="@color/baise"
android:textSize="18sp" /> <TextView
android:id="@+id/tv_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/qianhuang"
android:padding="8dp"
android:textSize="18sp" /> </LinearLayout>
</LinearLayout>
家庭版记账本app进度之编辑框组件的更多相关文章
- 家庭记账本app进度之下拉框和数字转轮的相关应用
这次主要是悬系的下拉框Spinner和数字转轮NumberPicker的使用.先分析相关的用到的知识点. 在Android中,用string-array是一种简单的提取XML资源文件数据的方法. 例子 ...
- 家庭版记账本app进度之关于listview显示账单,并为其添加点击事件
这个主要学习是关于listview的学习. 怎样去自定义adapter,以及使用.自己创建文件,还有就是为listview的每一个子控件添加点击事件. 在整个过程中收获到的知识点如下: 一.对于数据库 ...
- 家庭版记账本app进度之关于android界面布局的相关学习
1.线性布局(linearlayout)是一种让视图水平或垂直线性排列的布局线性布局使用<LinearLayout>标签进行配置对应代码中的类是android.widget.LinearL ...
- 家庭版记账本app进度之对于按钮的点击事件以及线性布局以及(alertdialog)等相关内容的应用测试
通过线性布局,制作出连个按钮还有文本输入框以及嘴上放的标题文本进行信息的相关显示,完后最后的信息的输入,之后在屏幕的的下方进行显示 当点击第一个按钮的时候,在下方就会简单的出现你自己刚刚输入的相关信息 ...
- 家庭版记账本app开发完成
经过这几天关于android的相关学习,对于家庭版记账本app以及开发结束. 实现的功能为:用户的注册.登录.添加支出账单.添加收入账单.显示所有的该用户的账单情况(收入和支出).生产图表(直观的显示 ...
- 家庭记账本app进度之android中AlertDialog的相关应用以及对日期时间的相关操作(应用alertdialog使用的谈话框)
对于AlertDialog的相关知识: 1.创建构造器AlertDialog.Builder的对象: 2.通过构造器对象调用setTitle.setMessage.setIcon等方法构造对话框 ...
- 家庭记账本app进度之复选框以及相应滚动条的应用
这次主要是对于android中复选框的相应的操作.以及其中可能应用到的滚动条的相关应用.每一个复选框按钮都要有一个checkBox与之相对应. 推荐使用XML配置,基本语法如下:<CheckBo ...
- 家庭版记账本app开发进度相关界面的规划
总的app界面包括四个页面,页面可以来回滑动.设计的时候就和微信的四个页面类似. 由于没有找到合适的图标进行替换,在此仍应用微信对应的四个图标. 总的四个页面是: 1.增加收入或者支出的小账单.当点击 ...
- 家庭版记账本app开发进度。开发到现在整个app只剩下关于图表的设计了,具体功能如下
首先说一下自己的功能: 实现了用户的登录和注册.添加收入记账和添加支出记账.粗略显示每条账单基本情况.通过点击每条账单来显示具体的情况, 之后就是退出当前用户的操作. 具体的页面情况如下: 这就是整个 ...
随机推荐
- C++ 指针偏移的理解
//题目:若有程序段int a[5] = { 1, 2, 3, 4, 5 }; int *p = (int *)(&a + 1); printf("%d,%d", *(a ...
- windows git pull或者push代码时弹出安全框解决办法
目录 1.打开控制面板->凭据管理器>删除已有的git凭证 2.新增一个凭证 @ 如果报如下错误: 1.打开控制面板->凭据管理器>删除已有的git凭证 2.新增一个凭证 网络 ...
- 在Linux环境安装redis步骤,且设置开机自动启动redis
最近在linux环境安装了redis学习,目前已经安装成功且设置开机即启动状态,我把步骤流程记录了下来,分享给需要的小伙伴. 1.我在/usr/local/localsoftware/目录下创建了一个 ...
- 读书笔记——商广明《Nmap渗透测试指南》
一 Nmap基础学习 1.简介及安装 Nmap是一款由C语言编写的.开源免费的网络发现(Network Discovery)和安全审计(Security Auditing)工具.软件名字Nmap是Ne ...
- CodeMixer工具,完美替代ChaosTool,iOS添加垃圾代码工具,代码混淆工具,代码生成器,史上最好用的垃圾代码添加工具,自己开发的小工具
新工具 ProjectTool 已上线 这是一款快速写白包工具,秒级别写H5游戏壳包,可视化操作,极易使用,支持Swift.Objecive-C双语言 扣扣交流群:811715780 进入 Proje ...
- LocalStorage与SessionStorage
localStorage与sessionStorage 每日更新前端基础,如果觉得不错,点个star吧
- canvas绘制流星雨特效
源码: <!DOCTYPE html><html> <head> <meta charset="utf-8"> <meta n ...
- hdu3368 dfs 下棋
两颗黑子之间的白子可以翻装成黑子,两颗白子之间的黑子可以翻转成白子,对于一个给定位置,有八个方向有翻转其他颜色的子的可能.规则之一是下棋的位置一定要能翻转对方的子. 求最优情况:黑子能翻转的白子个数的 ...
- dfs 例题皇后问题
题目描述 一个如下的 6 \times 66×6 的跳棋棋盘,有六个棋子被放置在棋盘上,使得每行.每列有且只有一个,每条对角线(包括两条主对角线的所有平行线)上至多有一个棋子. 上面的布局可以用序列 ...
- 基于arduino、百度云、采用django、redis鱼缸在线监控
大家好,今天我给大家分享一下之前做的一个鱼缸远程监控的案例,希望有人喜欢 首先给大家看一下结构框架,由于我之前买的arduino开发板不带wifi功能,所有是通过pc机转发一下上的百度云,最近我刚购买 ...