我想在Android中左下对齐我的文本。如何在android中对齐文本
13
A
回答
29
如果要将TextView中的文本与左下角对齐,请使用android:gravity="bottom|left"
。如果要将TextView对齐其容器的左下角,请使用android:layout_gravity="bottom|left"
。
尽管如此,我怀疑你是在误传你的真实意图。你想将某些文字对齐左下角的内容?屏幕?文本的容器?
请尝试更具体地处理您的问题。
屏幕左下方的:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:gravity="bottom|left"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"/>
</FrameLayout>
1
我会建议Relative layout。
您的看法是这样的:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Text aligned bottom left"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"/>
</RelativeLayout>
相关问题
- 1. 如何在Android Webview中对齐文本?
- 2. Android如何对齐文本左右editText
- 3. 在AlertView中对齐文本android
- 4. 在Android TextView中对齐文本
- 5. 在Android textview中对齐文本
- 6. 在TextView中对齐文本Android
- 7. 在Android Webview中对齐文本
- 8. 如何在Android中的标签栏中居中对齐文本
- 9. 如何在中心对齐UISegment文本
- 10. 如何在div中对齐文本?
- 11. 如何在DataGridView列中对齐文本?
- 12. 如何在python中对齐文本
- 13. 如何在Wordpress中对齐文本?
- 14. 如何在RichTextBox C#中“对齐”文本?
- 15. 如何在WPF RichTextBox中对齐文本
- 16. 如何在Android中对齐文本垂直中心
- 17. 如何对齐drawable w.r.t.在android中水平居中文本?
- 18. 如何对齐textview中的文本Android中的对象
- 19. Android编辑文本对齐
- 20. 的Android AlertDialog文本对齐
- 21. Android TextView文本对齐
- 22. 如何中心对齐文本inTextVIew在android系统
- 23. 如何在Android中将ListView文本对齐?
- 24. 如何在中心对齐标签文本android
- 25. 如何在Android TextView中将文本对齐到右边?
- 26. 如何在Android中将文本左对齐到RadioGroup?
- 27. 如何对齐文本中心,在画布上留下的Android
- 28. 如何在Android中对齐我的标题文本?
- 29. 如何在Java中对齐/填充文本Android
- 30. 如何在TextView for Android中对齐文本?
您有什么看法XML目前? – jball 2010-05-01 17:16:28
你有什么代码,你用的是什么样的xml看起来像atm? – wheaties 2010-11-21 16:21:35