【发布时间】:2012-12-07 15:30:38
【问题描述】:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:gravity="center"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ProgressBar android:id="@+android:id/progress_small"
style="?android:attr/progressBarStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:gravity="center"
android:text="LOREM IPSUM BAB BABALOREM IPSUM BAB BABALOREM"
/>
</LinearLayout>
Lorem 的 L 和进度条之间的间隙如何消除?我希望文本仅居中对齐。
textview 宽度是换行内容。但是两边都有差距。 如何摆脱它?
我也不打算单行它。因为我不想错过它显示的任何单词。
我也不希望左对齐
【问题讨论】:
-
我不认为你可以故意实现你的目标,我认为这取决于android如何包装单词等,添加一个短单词可能会将第一行推向左侧。至少我的 S2 上会发生这种情况
标签: android xml android-layout layout layout-gravity