android界面
自定义控件EditText
在src中的drawable新建myeditext.xml文件
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<!-- <gradient
android:angle="45"
android:endColor="#CCCCCC"
android:startColor="#CCCCCC" /> -->
<padding
android:bottom="7dp"
android:left="7dp"
android:right="7dp"
android:top="7dp" />
<!-- 设置圆角矩形 -->
<corners android:radius="10dp" />
<stroke
android:width="5px"
android:color="#1199EF" />
<solid android:color="#ffffff" />
</shape>
在布局EditText中加入
android:background="@drawable/editsharp"
RelativeLayout相对布局
<Button
android:id="@+id/login_btn_register"//设置控件id
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/login_btn_login"//在父控件的下方
android:layout_marginLeft="20dp"离左边缘20dp
android:layout_marginRight="20dp"离右边缘20dp
android:layout_marginTop="20dp"离顶部20dp
android:background="@color/colorPrimary"//设置背景颜色
android:text="注册"//文本
android:textColor="#ffffff"//设置文本颜色为白色
android:textSize="20dp" />//文本字体大小
这是密码输入框输入密码时显示*********
<EditText
android:layout_width="400dp"
android:layout_height="60dp"
android:inputType="textPassword"
android:ems="10"
android:id="@+id/login_edit_pwd"
android:drawableLeft="@android:drawable/ic_lock_idle_lock"//设置图片在EditText右边
android:hint="密码:"
android:layout_below="@+id/login_edit_account"//在父元素下方
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:background="@drawable/editsharp"//设置EditText的圆角和背景边框
/>
这是账号输入框输入账号显示输入的字符
<EditText
android:layout_width="400dp"
android:layout_height="60dp"
android:inputType="textPersonName"
android:id="@+id/login_edit_account"
android:drawableLeft="@android:drawable/ic_menu_myplaces"
android:hint="手机号:"
android:layout_below="@+id/logo"
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:background="@drawable/editsharp"/>
记住密码款可以勾选
<CheckBox
android:layout_width="100dp"
android:layout_height="20dp"
android:text="记住密码"
android:id="@+id/Login_Remember"
android:layout_below="@+id/login_edit_pwd"
android:checked="false"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:textSize="14dp" />
android界面的更多相关文章
- Android界面组件的四种启动方式
Android界面组件启动有四种方式 standard,singleTop,singleTask,singleInstance. standard:每次调用都会都会产生新的组件. singletop: ...
- android 界面设计基本知识Ⅲ
本章继续讲述在android界面设计中相关的知识点.介绍内容包括BroadcastReceiver(广播),Service(服务),Widget(小部件),WebView(网页加载控件). 1.Bro ...
- android 界面设计基本知识Ⅱ
上一章讲述了Android界面设计时,一些基本控件的使用,本章主要讲述自定义控件,Fragment和Headler线程机制. 1.自定义控件 (1)基本知识 dp.sp和dx px:像素点 ...
- 使用HTML来生产Android界面
使用HTML来生产Android界面 (2013-03-11 17:50:39) 转载▼ 分类: Android 1. HTML 开发软件界面 因为android软件开发分工目前还没有细化,程 ...
- 【Android源代码下载】收集整理android界面UI效果源码
在Android开发中,Android界面UI效果设计一直都是很多童鞋关注的问题,今天给大家分享下大神收集整理的多个android界面UI效果,都是源码,都是干货,贡献给各位网友! 话不多说,直接上效 ...
- 在Android界面特效中如何做出和墨迹天气及UC中左右拖动的效果
(国内知名Android开发论坛eoe开发者社区推荐:http://www.eoeandroid.com/) 在Android界面特效中如何做出和墨迹天气及UC中左右拖动的效果 相信这么多手机APP中 ...
- Android界面布局基本知识简述
Android手机操作系统在模拟器中进行相关的编写,可以帮助我们实现各种功能需求.尤其是在界面的操作方面显得更为突出.在这里我们就可以对Android界面布局的相关操作来对这方面的知识进行一个深入的了 ...
- Android界面刷新方法
Android提供了Invalidate方法实现界面刷新,但是Invalidate不能直接在线程中调用,因为他是违背了单线程模型:Android UI操作并不是线程安全的,并且这些操作必须在UI线程中 ...
- android界面设计之布局管理
谈到android界面设计,各种布局样式不得不提!传统的布局方式有6种,我们会一一介绍. 在android studio2.2版本之后出现了一款超棒的布局方式,真正意义上的所见即所得,后面我们也会讲到 ...
- Android界面跳转几种情况
Android界面简单跳转, Intent intent =new Intent(MainActivity.this,SecondActivity.class); startActivity(inte ...
随机推荐
- 遍历XML文件
#encoding=utf-8 from xml.etree import ElementTree as ET #要找出所有人的年龄 per=ET.parse('d:\\1.xml') p=per.f ...
- dedecms的自定义模块
dedecms的自定义模块 1.在dedecms主目录下创建一个模块目录 2.在模块目录下创建如下目录 网站根目录/ |-自定义模块 |-control 控制器 |-model 模型 |-stat ...
- JTSL/EL Expression学习
最早的一个学习笔记,时间过去了久了,供java web初学者参考. JTSL/EL Expression学习安排 学习目标:掌握几个常见标签的使用,通晓工作原理,详细到代码层面,遇到问题时能查得出异常 ...
- Halcon的C#二次开发及经验分享
本文涉及面较广,因此很难在所有方面都讲解得很详细,故适合具有一定Halcon开发经验的人阅读. 1.Halcon二次开发的两种方式 ① 使用C#的语法方式逐句改写Halcon代码 优点:各种变量的类型 ...
- 2018.10.14 NOIP训练 猜数游戏(决策单调性优化dp)
传送门 一道神奇的dp题. 这题的决策单调性优化跟普通的不同. 首先发现这道题只跟r−lr-lr−l有关. 然后定义状态f[i][j]f[i][j]f[i][j]表示猜范围为[L,L+i−1][L,L ...
- 2018.09.26 bzoj1015: [JSOI2008]星球大战starwar(并查集)
传送门 并查集经典题目. 传统题都是把删边变成倒着加边,这道题是需要倒着加点. 处理方法是将每个点与其他点的边用一个vector存起来,加点时用并查集统计答案就行了. 代码: #include< ...
- MyISAM压缩表
如果表在创建并导入数据以后,不会在进行修改操作,那么这样的表或许适合采用MyISAM压缩表. 压缩表可以极大地减少磁盘空间暂用,因此也可以减少磁盘I/O,从而提升查询性能,压缩表也支持索引.
- qmake -简介
qmake 简化了在不同平台下开发项目时构建处理的过程. qmake 自动产生Makefiles文件,只需要几行信息来构建每个Makefile.qmake可以被用于任何软件项目,不管是否使用Qt. q ...
- PHP数据库抽象层--PDO(PHP Data Object) [一]
1.简介:(PDO数据库访问抽象层,统一各种 数据库的访问接口 ) PHP 数据对象 (PDO) 扩展为PHP访问数据库定义了一个轻量级的一致接口.实现 PDO 接口的每个数据库驱动可以公开具体数据库 ...
- 201709025工作日记--更新UI方法
1.handler+Thread 和 runOnUIThread 和 handler.post 方法 区别: 从实现原理上,两者别无二致,runOnUiThread也是借助Handler实现的. 对 ...