1
A
回答
1
是,如果你的父母佈局是一個RelativeLayout你可以定位在關係視圖彼此還是這裏的家長是一個簡單的例子(警告沒有輸入到這個IDE,可能包含錯字):
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button
android:id="@+id/mBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="I am a Button!"
android:layout_centerInParent="true" />
<TextView
android:id="@+id/mTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:text"Some Text"
android:layout_above="@+id/mBtn" />
</RelativeLayout>
這將使您的佈局看起來大致如下:
________________________
| |
| |
| Some Text |
| [I am a Button!] |
| |
| |
|______________________|
相關問題
- 1. Android - 定位textview在中心
- 2. Android ListView定位爲TextView
- 3. 通過ImageView定位的Android TextView
- 4. android位置圖像上的「固定」位置上的TextView
- 5. Android TextView,將textview中的指定字符移動到指定的位置?
- 6. 設定Android的TextView
- 7. Android TextView寬度單位?
- 8. Android的:如何使TextView的複方位
- 9. Android的相同位置的TextView
- 10. 在TableLayout中獲取TextView的位置Android
- 11. 根據gridview的位置更新textview android
- 12. 從android中的textview獲取位圖
- 13. 徽章圖標定位在TextView長度的右下方Android
- 14. Android:將TextView放置在XML中的指定位置周圍
- 15. Android - 定期更新TextView
- 16. Linkify在textView中的自定義位置?
- 17. 如何讓我的TextView定位響應?
- 18. Android顯示位置動態到TextView中
- 19. Android - 以編程方式在佈局中定位TextView
- 20. 的Android - TextView中的值設置爲自定義的TextView
- 21. Android的TextView
- 22. 的Android TextView的定義強制換行
- 23. Android的數據綁定浮到TextView的
- 24. 的Android應用樣式定製的TextView
- 25. Android TextView
- 26. Android TextView
- 27. Android TextView
- 28. Android - 如何使用自定義的TextView?
- 29. 帶有自定義背景的Android TextView?
- 30. android自定義imageview和textview的權利
完美。非常感謝! – Mobie 2012-08-03 22:45:43