私のレイアウトには、次のような4つのブロックがあります。
<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>
アンドロイドエミュレーターでこの写真になります:
明らかな質問は次のとおりです。EditTextとプログレスバーを垂直方向に揃えるにはどうすればよいですか。
前もって感謝します!
center属性を追加した場合の望ましい結果は次のとおりです。
問題が解決しました!