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的TextView
- 3. Android TextView寬度單位?
- 4. Android的相同位置的TextView
- 5. Android的:如何使TextView的複方位
- 6. 從android中的textview獲取位圖
- 7. 在TableLayout中獲取TextView的位置Android
- 8. Android - 定期更新TextView
- 9. 如何讓我的TextView定位響應?
- 10. Linkify在textView中的自定義位置?
- 11. Android - 以編程方式在佈局中定位TextView
- 12. 的Android - TextView中的值設置爲自定義的TextView
- 13. 的Android應用樣式定製的TextView
- 14. Android的數據綁定浮到TextView的
- 15. Android TextView
- 16. Android TextView
- 17. 帶有自定義背景的Android TextView?
- 18. Android - 如何使用自定義的TextView?
- 19. TextView定時器秒數位跳
- 20. 如何從代碼中定位TextView?
- 21. 的Android PorterDuff.Mode.OVERLAY的TextView
- 22. Android的GPS定位
- 23. 定位的Android UI
- 24. Android:如何確定觸摸事件在TextView中的位置的字符索引?
- 25. 爲什麼textview的長度決定了android中其他元素的位置?
- 26. Android onLongClick TextView的bug
- 27. Android的TextView風格
- 28. TEXTVIEW證明位置
- 29. TextView字幕移位相鄰TextView
- 30. 在Android中使用TextView,TextView,RadioGroup自定義ListView
完美。非常感謝! – Mobie 2012-08-03 22:45:43