导航:首页 > 操作系统 > android登录界面布局

android登录界面布局

发布时间:2024-08-26 02:26:04

⑴ 如何使用android Studio开发用户登录界面

一个登录界面需要有:

  1. 登录、注册按钮(Button)

  2. 用户名、密码输入框(TextView,EditView)

  3. 用户协议连接

  4. 忘记密码按钮


想好的有哪些控件后,开始设计界面大概样式,比如这个样子:

安卓登录界面就写完了。

⑵ 怎样设计android系统的用户界面请简述界面布局方式

1 学习原生软件的界面开发,而且最好还是看一些开源的,无论从设计的角度还是从开发的角度都是极好的。
比如优秀的作品很多,这些不开源学习界面就好,开源的可以看看系统的应用。和系统本身结合的非常好,设计风格和系统也很统一,给用户较好的体验。
2 确定整体产品色彩基调,色彩基调可以从产品功能中提取,也可以从产品LOGO中提取;
3 做出界面原型,包括功能布局、页面交互等元素;
4 在界面原型基础上进行色彩添加,进一步的细节调整;
5 有了好的外形基础后,再就是回归到用户体验。记住用户才是第一位的。交互设计通常靠外形吸引用户,但真正留住用户的是细节上的人性化。让这些极简的设计细节控制用户的生活习惯,最终让用户离不开它们!根据用户使用体验反馈再次修改界面,不断完善。

⑶ Android如何实现类似于QQ登录的界面,求大神!

首先程序进入SplashActivity,就是启动页面。
xml布局文件就是一个全屏的图片,要注意的是设置android:scaleType ="matrix"这个属性。不然不会全屏。
过1秒之后转入登陆页面,从图片我们可以看出,腾讯的UI做的还是相当美观漂亮的,既简洁又不失美观。先分析一下这个登录界面,从整体可以看出,根布局的
背景色是蓝色的,而那个QQ Android其实是一个图片背景色和根布局的背景色一样,这样就不会有视觉偏差。

⑷ android怎么做动态的登陆界面

设计android的登录界面的方法:

UI实现的代码如下:

1、背景设置图片:

background_login.xml

<?xmlversion="1.0"encoding="utf-8"?>

<shapexmlns:android="http://schemas.android.com/apk/res/android">

<gradient

android:startColor="#FFACDAE5"

android:endColor="#FF72CAE1"

android:angle="45"

/>

</shape>

2、圆角白框

效果图上面的并不是白框,其实框是白色的,只是设置了透明值,也是靠一个xml文件实现的。

background_login_div.xml

<?xmlversion="1.0"encoding="UTF-8"?>

<shapexmlns:android="http://schemas.android.com/apk/res/android">

<solidandroid:color="#55FFFFFF"/>

<!--设置圆角

注意:bottomRightRadius是左下角而不是右下角bottomLeftRadius右下角-->

<cornersandroid:topLeftRadius="10dp"android:topRightRadius="10dp"

android:bottomRightRadius="10dp"android:bottomLeftRadius="10dp"/>

</shape>


3、界面布局:

login.xml

<?xmlversion="1.0"encoding="utf-8"?>

<LinearLayout

xmlns:android="http://schemas.android.com/apk/res/android"

android:orientation="vertical"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:background="@drawable/background_login">

<!--padding内边距layout_margin外边距

android:layout_alignParentTop布局的位置是否处于顶部-->

<RelativeLayout

android:id="@+id/login_div"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:padding="15dip"

android:layout_margin="15dip"

android:background="@drawable/background_login_div_bg">

<!--账号-->

<TextView

android:id="@+id/login_user_input"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_alignParentTop="true"

android:layout_marginTop="5dp"

android:text="@string/login_label_username"

style="@style/normalText"/>

<EditText

android:id="@+id/username_edit"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:hint="@string/login_username_hint"

android:layout_below="@id/login_user_input"

android:singleLine="true"

android:inputType="text"/>

<!--密码text-->

<TextView

android:id="@+id/login_password_input"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_below="@id/username_edit"

android:layout_marginTop="3dp"

android:text="@string/login_label_password"

style="@style/normalText"/>

<EditText

android:id="@+id/password_edit"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:layout_below="@id/login_password_input"

android:password="true"

android:singleLine="true"

android:inputType="textPassword"/>

<!--登录button-->

<Button

android:id="@+id/signin_button"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_below="@id/password_edit"

android:layout_alignRight="@id/password_edit"

android:text="@string/login_label_signin"

android:background="@drawable/blue_button"/>

</RelativeLayout>

<RelativeLayout

android:layout_width="fill_parent"

android:layout_height="wrap_content">

<TextViewandroid:id="@+id/register_link"

android:text="@string/login_register_link"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginLeft="15dp"

android:textColor="#888"

android:textColorLink="#FF0066CC"/>

<ImageViewandroid:id="@+id/miniTwitter_logo"

android:src="@drawable/cat"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_alignParentRight="true"

android:layout_alignParentBottom="true"

android:layout_marginRight="25dp"

android:layout_marginLeft="10dp"

android:layout_marginBottom="25dp"/>

<ImageViewandroid:src="@drawable/logo"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_toLeftOf="@id/miniTwitter_logo"

android:layout_alignBottom="@id/miniTwitter_logo"

android:paddingBottom="8dp"/>

</RelativeLayout>

</LinearLayout>

4、java源代码,Java源文件比较简单,只是实例化Activity,去掉标题栏。

packagecom.mytwitter.acitivity;

importandroid.app.Activity;

importandroid.os.Bundle;

importandroid.view.Window;

{

@Override

publicvoidonCreate(BundlesavedInstanceState){

super.onCreate(savedInstanceState);

requestWindowFeature(Window.FEATURE_NO_TITLE);

setContentView(R.layout.login);

}

}

5、实现效果如下:

⑸ android的界面布局方式有哪些

一、界面布局之线性布局(LinearLayout)

这种布局比较常用,也比较简单,就是每个元素占一行,把它按照横向排放,也就是每个元素占一列。在布局中都按照垂直或者水平的顺序依次排列子元素,每一个子元素都位于前一个元素之后。

二、界面布局之相对布局(RelativeLayout)

相对布局是android界面设计中比较常用和好用的一个布局方式。

三、界面布局之表格布局(TableLayout)

表格布局采用行、列的形式来管理元素组件。TableLayout的行和列不需要声明,而是采用添加方法控制。

每次在TableLayout中添加一个TableRow,一个TableRow就代表表格中的一行,也同样是容器,往里面添加一个子组件就代表增加一列。在表格布局中,列的宽度由最宽的那个单元格决定,整个表格布局宽度取决于父容器的宽度

四、界面布局之绝对布局(AbsoluteLayout)

特点:以坐标的方式来定位在屏幕上的位置,引起缺乏灵活性,在没有绝对定位的情况下相比其他类型的布局更难维护

五、界面布局之帧布局(FrameLayout)

FrameLayout是五大布局中最简单的一个布局。在帧布局中,整个界面被当成一块空白备用区域,所有的子元素都不能被指定放置的位置,它们统统放于这块区域的左上角,并且后面的子元素直接覆盖在前面的子元素之上,将前面的子元素部分和全部遮挡。

转自长沙软件公司---小房子

⑹ 如何设计android的登录界面

在网上在到一个登录界面感觉挺不错的,给大家分享一下~先看效果图:

这个Demo除了按钮、小猫和Logo是图片素材之外,其余的UI都是通过代码实现的。

?

一、背景

背景蓝色渐变,是通过一个xml文件来设置的。代码如下:

background_login.xml

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:andro>
<gradient
android:startColor="#FFACDAE5"
android:endColor="#FF72CAE1"
android:angle="45"
/>
</shape>


startColor是渐变开始的颜色值,endColor是渐变结束的颜色值,angle是渐变的角度。其中#FFACDAE5中,FF是Alpha值,AC是RGB的R值,DA是RGB的G值,E5是RGB的B值,每个值在00~FF取值,即透明度、红、绿、蓝有0~255的分值,像要设置具体的颜色,可以在PS上的取色器上查看设置。

?

?

二、圆角白框

效果图上面的并不是白框,其实框是白色的,只是设置了透明值,也是靠一个xml文件实现的。

background_login_div.xml

<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:andro>
<solid android:color="#55FFFFFF" />
<!-- 设置圆角
注意: bottomRightRadius是左下角而不是右下角 bottomLeftRadius右下角-->
<corners android:topLeftRadius="10dp" android:topRightRadius="10dp"
android:bottomRightRadius="10dp" android:bottomLeftRadius="10dp"/>
</shape>

?

三、界面的布局

界面的布局挺简单的,就直接贴代码啦~

login.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:andro
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background_login">
<!-- padding 内边距 layout_margin 外边距
android:layout_alignParentTop 布局的位置是否处于顶部 -->

<RelativeLayout
android:
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="15dip"
android:layout_margin="15dip"
android:background="@drawable/background_login_div_bg" >
<!-- 账号 -->
<TextView
android:
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="5dp"
android:text="@string/login_label_username"
/>
<EditText
android:
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/login_username_hint"
android:layout_below="@id/login_user_input"
android:singleLine="true"
android:inputType="text"/>
<!-- 密码 text -->
<TextView
android:
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/username_edit"
android:layout_marginTop="3dp"
android:text="@string/login_label_password"
/>
<EditText
android:
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/login_password_input"
android:password="true"
android:singleLine="true"
android:inputType="textPassword" />
<!-- 登录button -->
<Button
android:
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/password_edit"
android:layout_alignRight="@id/password_edit"
android:text="@string/login_label_signin"
android:background="@drawable/blue_button" />
</RelativeLayout>

<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView android:
android:text="@string/login_register_link"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:textColor="#888"
android:textColorLink="#FF0066CC" />
<ImageView android:
android:src="@drawable/cat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="25dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="25dp" />
<ImageView android:src="@drawable/logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/miniTwitter_logo"
android:layout_alignBottom="@id/miniTwitter_logo"
android:paddingBottom="8dp"/>
</RelativeLayout>
</LinearLayout>

阅读全文

与android登录界面布局相关的资料

热点内容
淘宝客网站源码下载 浏览:765
linux好用的编辑器 浏览:998
linuxpartprobe 浏览:315
视频教育网站源码 浏览:514
java指定位数的随机数 浏览:900
300公斤压缩机 浏览:549
java时间转换毫秒数 浏览:290
我的世界怎么开挂在服务器 浏览:848
app怎么退定金 浏览:925
php获取外网地址 浏览:172
单片机lan 浏览:582
html炫酷黑页源码 浏览:955
如何远程更新服务器 浏览:785
服务器导轨怎么安装图解 浏览:984
如何设置加密共享文档 浏览:656
单片机双灯左移右移 浏览:927
网页无法打开pdf 浏览:556
linux命令scp 浏览:519
怎样把图片转为pdf格式 浏览:115
linux变量类型 浏览:840