2012-06-14 77 views
0

我正在開發針對android 3.0平板電腦的應用程序。此應用程序的一項活動包含用戶註冊表單。用於Android平板電腦註冊表單的UI佈局

這是我的初步XML佈局與幾個字段

<?xml version="1.0" encoding="utf-8"?> 
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" > 

    <LinearLayout 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:orientation="vertical" 
     android:padding="15dp" > 

     <TextView 
      style="@style/lable" 
      android:text="Name" /> 

     <LinearLayout 
      android:layout_width="fill_parent" 
      android:layout_height="match_parent" 
      android:orientation="horizontal" > 

      <EditText 
       android:id="@+id/firstName" 
       style="@style/editText" 
       android:hint="First Name" 
       android:inputType="textPersonName" > 

       <requestFocus /> 
      </EditText> 

      <EditText 
       android:id="@+id/lastName" 
       style="@style/editText" 
       android:hint="Last Name" 
       android:inputType="textPersonName" > 
      </EditText> 
     </LinearLayout> 

     <!-- USER NAME --> 

     <TextView 
      style="@style/lable" 
      android:text="Choose your username" /> 

     <EditText 
      android:id="@+id/userName" 
      style="@style/editText" 
      android:ems="10" 
      android:hint="Username" 
      android:inputType="textEmailAddress" /> 
    </LinearLayout> 

</ScrollView> 

下面是相應的style.xml

<?xml version="1.0" encoding="utf-8"?> 
<resources> 
    <style name="lable"> 
     <item name="android:layout_width">wrap_content</item> 
     <item name="android:layout_height">wrap_content</item> 
     <item name="android:textAppearance">?android:attr/textAppearanceMedium</item> 
     <item name="android:paddingTop">10dp</item> 
     <item name="android:textStyle">bold</item> 
    </style> 

    <style name="editText"> 
     <item name="android:layout_width">fill_parent</item> 
     <item name="android:layout_height">wrap_content</item> 
     <item name="android:textAppearance">?android:attr/textAppearanceMedium</item> 

     <item name="android:layout_weight">1</item> 
    </style> 
</resources> 

添加幾個字段,我注意到有很多的螢幕上的空白之後。任何人都可以告訴我什麼將適當的安排在平板電腦用戶界面創建註冊表格?

+0

這不是一種你會問的問題,我想。因爲這是一個設計或ux問題,而不是編程問題。也許試試http://ux.stackexchange.com/ –

+2

不,它不是ux.stackexchange問​​題,因爲它需要技術建議。它已經在那裏問過了,並已關閉。問題只應發佈在一個網站上,如果它屬於別處,版主將遷移它,所以它不會在整個SE網絡中重複。 – JonW

+0

我想我誤解了這個問題,謝謝 –

回答

0

您可能會嘗試將名字和姓氏並排放置,因爲平板電腦的尺寸比它們的高度要寬。

名稱:名姓 也許 名稱:姓,名字

您也可以嘗試使用片段之前或登記形式的活動如果可能的話後顯示的活動。