2017-08-25 97 views
-4

enter image description hereAndroid的UI設計

我努力使UI爲我的應用程序,但不知道如何登錄,用戶名採用這種形象,在XML提交提。
正如我上面發佈的Android登錄頁UI,我怎麼能提到用戶名或密碼字段在XML文件,或點擊登錄,因爲它是PNG圖像文件,或者它可能是動畫,如果image.png不是然後使用此處使用的內容,如圖像可點擊字段中的這種情況。

在此先感謝.... !!!

我是學習設計Android UI的新手。

+0

我不知道如何做到這一點,新的學習,有什麼搜索 –

+0

我能做到這一點的u是不是很難設計這種類型的UI。 –

+0

只想知道如何提交用戶名desinge和使用?是在側面圖像中編輯文本? –

回答

0

您需要在.xml文件中通過xml編碼設計ui。你不能直接使用圖像,因爲它不包含任何EditText,Button等xml代碼。 you can refer this link for android ui tutorial

,或者你可以參考下面的XML代碼

<!?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:fitsSystemWindows="true" > 

    <LinearLayout 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:gravity="center" 
     android:orientation="vertical" 
     android:background="#011a32" 
     android:padding="16dp"> 


     <ImageView 
      android:layout_width="@dimen/logo_w_h" 
      android:layout_height="@dimen/logo_w_h" 
      android:layout_gravity="center_horizontal" 
      android:layout_marginBottom="30dp" 
      android:src="@mipmap/ic_launcher" /> 

     <android.support.design.widget.TextInputLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:textColorHint="#fff"> 

      <EditText 
       android:id="@+id/email" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:hint="Username" 
       android:inputType="textEmailAddress" 
       android:maxLines="1" 
       android:minLines="1" /> 

     </android.support.design.widget.TextInputLayout> 

     <android.support.design.widget.TextInputLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_marginTop="10dp" 
      android:textColorHint="#fff"> 

      <EditText 
       android:id="@+id/password" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:focusableInTouchMode="true" 
       android:hint="Password" 
       android:imeActionId="@+id/login" 
       android:imeOptions="actionUnspecified" 
       android:inputType="textPassword" 
       android:maxLines="1"/> 

     </android.support.design.widget.TextInputLayout> 

     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_marginTop="10dp" 
      android:orientation="horizontal"> 

      <CheckBox 
       android:layout_width="0dp" 
       android:layout_height="wrap_content" 
       android:layout_weight="0.2"/> 

      <TextView 
       android:layout_width="0dp" 
       android:layout_height="wrap_content" 
       android:layout_weight="1" 
       android:text="Remember me" 
       android:gravity="left" 
       android:textColor="#fff"/> 

      <TextView 
       android:layout_width="0dp" 
       android:layout_height="wrap_content" 
       android:layout_weight="1" 
       android:text="Forgot Password" 
       android:gravity="right" 
       android:textColor="#fff"/> 

     </LinearLayout> 

     <Button 
      android:id="@+id/sign_up_button" 
      style="?android:textAppearanceSmall" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_marginTop="16dp" 
      android:background="@android:color/holo_red_dark" 
      android:text="Login" 
      android:textColor="@android:color/white" 
      android:textStyle="bold" /> 

     <Button 
      android:id="@+id/sign_in_button" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:layout_marginTop="20dip" 
      android:background="@android:color/holo_red_dark" 
      android:text="Create An Account" 
      android:textAllCaps="false" 
      android:textColor="@android:color/white" 
      android:textSize="15dp" /> 


    </LinearLayout> 

</RelativeLayout> 
+0

所以它的意思是在上面的圖片,登錄名,用戶名,.. fileds desinge和背景從xml文件中選擇,或者你可以稍微解釋一下上面的imgae,開發者是怎麼做的。上面的圖片 –

+0

仍然是我從你的答案中得到的一件事,我們無法使用圖片。 ,但可以使用desinge filelds像這裏的用戶名,密碼...等... –

+0

請詳細一點.... –