<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进度之编辑框组件的更多相关文章

  1. 家庭记账本app进度之下拉框和数字转轮的相关应用

    这次主要是悬系的下拉框Spinner和数字转轮NumberPicker的使用.先分析相关的用到的知识点. 在Android中,用string-array是一种简单的提取XML资源文件数据的方法. 例子 ...

  2. 家庭版记账本app进度之关于listview显示账单,并为其添加点击事件

    这个主要学习是关于listview的学习. 怎样去自定义adapter,以及使用.自己创建文件,还有就是为listview的每一个子控件添加点击事件. 在整个过程中收获到的知识点如下: 一.对于数据库 ...

  3. 家庭版记账本app进度之关于android界面布局的相关学习

    1.线性布局(linearlayout)是一种让视图水平或垂直线性排列的布局线性布局使用<LinearLayout>标签进行配置对应代码中的类是android.widget.LinearL ...

  4. 家庭版记账本app进度之对于按钮的点击事件以及线性布局以及(alertdialog)等相关内容的应用测试

    通过线性布局,制作出连个按钮还有文本输入框以及嘴上放的标题文本进行信息的相关显示,完后最后的信息的输入,之后在屏幕的的下方进行显示 当点击第一个按钮的时候,在下方就会简单的出现你自己刚刚输入的相关信息 ...

  5. 家庭版记账本app开发完成

    经过这几天关于android的相关学习,对于家庭版记账本app以及开发结束. 实现的功能为:用户的注册.登录.添加支出账单.添加收入账单.显示所有的该用户的账单情况(收入和支出).生产图表(直观的显示 ...

  6. 家庭记账本app进度之android中AlertDialog的相关应用以及对日期时间的相关操作(应用alertdialog使用的谈话框)

    对于AlertDialog的相关知识: 1.创建构造器AlertDialog.Builder的对象:    2.通过构造器对象调用setTitle.setMessage.setIcon等方法构造对话框 ...

  7. 家庭记账本app进度之复选框以及相应滚动条的应用

    这次主要是对于android中复选框的相应的操作.以及其中可能应用到的滚动条的相关应用.每一个复选框按钮都要有一个checkBox与之相对应. 推荐使用XML配置,基本语法如下:<CheckBo ...

  8. 家庭版记账本app开发进度相关界面的规划

    总的app界面包括四个页面,页面可以来回滑动.设计的时候就和微信的四个页面类似. 由于没有找到合适的图标进行替换,在此仍应用微信对应的四个图标. 总的四个页面是: 1.增加收入或者支出的小账单.当点击 ...

  9. 家庭版记账本app开发进度。开发到现在整个app只剩下关于图表的设计了,具体功能如下

    首先说一下自己的功能: 实现了用户的登录和注册.添加收入记账和添加支出记账.粗略显示每条账单基本情况.通过点击每条账单来显示具体的情况, 之后就是退出当前用户的操作. 具体的页面情况如下: 这就是整个 ...

随机推荐

  1. Windows下EDK2环境的搭建以及经典的程序设计Print Hello World !-----(Linux下的待后续熟练了再更新)

    很久没有更新博客了,之前的博客末尾有提到过要写有关EDK2环境搭建的博客,现在就是完成的时候了,后续博客更新会比较规律(大概每周一篇?) 本人博客仅仅发表于博客园,本人主页为         http ...

  2. js 随机产生100个0~1000之间的整数

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  3. 使用form 表单 弹出登录框,只传递数据,不刷新界面

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  4. Android微信逆向--实现发朋友圈动态

    0x0 前言 最近一直在研究Windows逆向的东西,想着快要把Android给遗忘了.所以就想利用工作之余来研究Android相关的技术,来保持对Android热情.调用微信代码来发送朋友圈动态一直 ...

  5. iconfont字体图标的使用方法(转)

    我之前因为项目用bootstrap比较多,所以使用font awesome字体图标比较多,后来接触到了iconfont,发现想要的什么图标都有,还可以自定义图标,非常强大!之前看了一波教程,觉得繁琐, ...

  6. 如何在vue中修改动态标签中的样式和修改组件库样式

    vue中修改动态标签中的样式和修改组件库样式 因为vue中的标签在渲染的时候,都会给标签加上id 所以你想在<style lang="scss" scoped>直接修改 ...

  7. BAPC K题 Keep Him Inside

    Problem Statement: As a result of a long-standing war between the Sorcerers and the Orcs, you have b ...

  8. Vulnhub 靶场 Dijnn WP

    About djinn: 1 描述 难度级别:中等 Flag:user.txt和root.txt 说明:该计算机是VirtualBox以及VMWare兼容的.DHCP将自动分配IP.您将在登录屏幕上看 ...

  9. 前端视频直播技术总结及video.js在h5页面中的应用

    全手打原创,转载请标明出处:https://www.cnblogs.com/dreamsqin/p/12557070.html,多谢,=.=~ (如果对你有帮助的话请帮我点个赞啦) 目前有一个需求是在 ...

  10. 【面试QA】Attention

    目录 Attention机制的原理 Attention机制的类别 双向注意力 Self-Attention 与 Soft-Attention 的区别 Transformer Multi-Head At ...