LinearLayout里边有3个控件,摆好了以后,只给中间的控件设置weight,两边的控件就会分开两头
<LinearLayout android:id="@+id/changeVoc" style="@style/activity_me_option"> <ImageView android:layout_width="18dp" android:layout_height="18dp" android:background="@drawable/qh" /> <TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:paddingLeft="8dp" android:text="@string/personal_change_deck" android:textColor="#303030" android:textSize="@dimen/font_size_30" /> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/next_icon" /> </LinearLayout>