在我的佈局,我有四塊這樣的:如何在水平LinearLayout中垂直對齊EditText和ProgressBar?
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/label1"
android:layout_width="100dip"
android:layout_height="wrap_content"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:text="@string/freq_1_50" />
<ProgressBar android:id="@+id/progress_horizontal1"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="100dip"
android:layout_height="wrap_content"
android:max="100"
android:progress="50" />
<EditText
android:id="@+id/textScore1"
android:layout_width="100dip"
android:layout_height="wrap_content"
android:focusable="false"
android:focusableInTouchMode="false"
android:inputType="none"
android:text="50%" />
</LinearLayout>
在這張照片中的Android模擬器得到的:
顯而易見的問題是:我怎麼去在垂直取向EditText和進度條?
在此先感謝!
下面是添加中心屬性的所期望的結果:
問題解決了!
我很好奇,你是怎麼解決它的? – JJ86 2013-03-22 16:04:10