0
ここに私のコードです。私もTableLayoutでこれを試しました。私が何をしているかにかかわらず、すべてが左に並んでいます。これを望みます(通常のユースケースと思われるもの)。同じ親に左右のビューを並べる最良の方法は?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/actionbar"
android:orientation="horizontal"
android:background="@layout/lightblue_gradient"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_margin="3dip"
android:gravity="left"
android:src="@drawable/logo" />
<ImageView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:gravity="right"
android:src="@drawable/ic_menu_search" />
</LinearLayout>
1 @andreas。これは私の知るべき最善の方法です。 – Varun