1
A
回答
0
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center_vertical">
<TableRow
android:id="@+id/row1"
android:layout_marginTop="25dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/txtUserName"
android:layout_marginLeft="50dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="2dp"
android:text="Username"
android:textSize="16sp" />
</TableRow>
<TableRow
android:id="@+id/row2"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<EditText
android:inputType="text"
android:id="@+id/editUsername"
android:layout_width="fill_parent"
android:layout_height="40dp"
android:layout_weight="2"
android:singleLine="true"
android:layout_marginLeft="50dp"
android:layout_marginTop="2dip"
android:layout_marginRight="50dp"
android:padding="10dp"/>
</TableRow>
<TableRow
android:id="@+id/row3"
android:layout_marginTop="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/txtPassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="2dp"
android:layout_marginLeft="50dp"
android:text="password"
android:textSize="16sp" />
</TableRow>
<TableRow
android:id="@+id/row4"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<EditText
android:inputType="textPassword"
android:id="@+id/editPassword"
android:layout_width="fill_parent"
android:layout_height="40dp"
android:layout_weight="2"
android:layout_marginTop="2dip"
android:layout_marginRight="50dp"
android:layout_marginLeft="50dp"
android:padding="10dp"
android:password="true"
android:singleLine="true"/>
</TableRow>
<TableRow
android:id="@+id/row6"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<Button
android:id="@+id/login"
android:layout_width="100dp"
android:layout_height="35dp"
android:text="login"
android:textStyle="bold"
android:layout_marginLeft="102dp"/>
</TableRow>
</TableLayout>
相關問題
- 1. Android:當鍵盤消失時,EditText上的彈出菜單不會向下移動
- 2. Android打開softkeypad時向上移動整個屏幕?
- 3. 當鍵盤彈出時向上移動佈局
- 4. 當鍵盤彈出時移動UIButton
- 5. Softkeypad亙古不變的彈出
- 6. 彈出窗口上的EditText
- 7. 鍵盤出現時向上移動UITextField
- 8. 當鍵盤出現時向上移動UIView
- 9. Swift:當鍵盤出現時向上移動UILabel
- 10. jquery移動彈出ui彈出屏幕不滾動時滾動
- 11. 當頁面向上或向下滾動時移動圖像
- 12. 導航欄向上移動,同時導航控制器的彈出動畫
- 13. 當彈出菜單打開時,移動網站不斷縮小
- 14. 點擊EditText上不能彈出softkeyboard
- 15. 空白EditText上彈出錯誤
- 16. 正在移動文件時Powershell彈出
- 17. 幻燈片彈出時內容移動
- 18. 在EditText中鍵盤啓動時工具欄正在向上移動
- 19. 當佈局在上面縮小時,向上移動佈局
- 20. 當鍵盤處於活動狀態時,UITableView向上移動
- 21. 當鍵盤可見時,ScrollView不會自動向上移動
- 22. 移動彈出到前臺
- 23. JavaScript的在移動彈出
- 24. 移動彈出窗口
- 25. 移動dygraphs彈出標籤
- 26. 在EditText焦點上從右向左移動drawElement
- 27. 使用swift時,textfield在鍵盤出現時向上移動
- 28. 當下拉菜單出現時,div向右移動
- 29. 在ViewPager中從左向右滑動時顯示彈出框,並且在彈出頁面不應該移動
- 30. 乒乓球拍移動時帆布球彈向錯誤方向
我想,[這會爲你工作(http://stackoverflow.com/questions/11541862/make-an-edit-text-appear-between-the-top-和軟鍵盤的設備在/ 11544908#11544908) – 2012-07-31 10:35:50
那是什麼字體? – edwoollard 2012-07-31 10:39:00
你見過/試過上面的鏈接嗎? – 2012-07-31 10:42:11