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 ...
随机推荐
- C#调用默认浏览器打开网页的几种方法
private void button1_Click(object sender, EventArgs e) { //从注册表中读取默认浏览器可执行文件路径 RegistryKey key = Reg ...
- kafka 报Failed to load class "org.slf4j.impl.StaticLoggerBinder".[z]
转:http://blog.chinaunix.net/uid-25135004-id-4172954.html 测试kafka producer发送消息 和 consumer 接受消息报错 ...
- PHP+Gtk实例(求24点)
作者: Laruence( ) 本文地址: http://www.laruence.com/2009/05/26/871.html 转载请注明出处 最近要安排我为BIT提供的<PHP高级应用 ...
- select查询
4.2 查询功能 SQL的核心是查询.SQL的查询命令也称作SELECT命令,它的基本形式由SELECT-FROM-WHERE查询块组成,多个查询块可以嵌套执行. 以下表为以后的例子中使用表: 档案 ...
- Speeding up Homestead on Windows Using NFS
Speeding up Homestead on Windows Using NFS Sep 07 2015 Homestead Laravel EDIT: I have another articl ...
- 5条面经,助你成功拿到UX设计师Offer
为什么成为 UX设计师? 如果你经常逛推酷, 知乎, 设计达人或者一些专业的设计师论坛,博客,你会发现,第一批成为UX设计师的人,其实是误打误撞地落入这个行业的.那时候人们并不清楚UX设计师是什么 ...
- 软工1816 · 作业(八)项目UML设计
团队信息 队员姓名与学号 学号 姓名 博客链接 124 王彬(组长) 点击这里 206 赵畅 点击这里 215 胡展瑞 点击这里 320 李恒达 点击这里 131 佘岳昕 点击这里 431 王源 点击 ...
- Android 在一个程序中启动另一个程序(包名,或者类名)
http://hi.baidu.com/xiaofanqing/item/6fd724f7c5bb6dce531c26b7 Android 开发有时需要在一个应用中启动另一个应用,比如Launcher ...
- 2018.09.26 bzoj5221: [Lydsy2017省队十连测]偏题(数学推导+矩阵快速幂)
传送门 由于没有考虑n<=1的情况T了很久啊. 这题很有意思啊. 考试的时候根本不会,骗了30分走人. 实际上变一个形就可以了. 推导过程有点繁杂. 直接粘题解上的请谅解. 不得不说这个推导很妙 ...
- WPF 嵌入字体文件
官方说明文档:将字体与应用程序一起打包 https://docs.microsoft.com/zh-cn/dotnet/framework/wpf/advanced/packaging-fonts-w ...