⑴ 如何使用android Studio開發用戶登錄界面
一個登錄界面需要有:
登錄、注冊按鈕(Button)
用戶名、密碼輸入框(TextView,EditView)
用戶協議連接
忘記密碼按鈕
想好的有哪些控制項後,開始設計界面大概樣式,比如這個樣子:
安卓登錄界面就寫完了。
⑵ 怎樣設計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>