I would like to have EditTextand ImageViewnext to each other; ImageViewhas a fixed width, EditTextshould take everything else.
I'm trying to do it through
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="wrap_content">
<EditText android:id="@+id/edit_select_stop" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageView android:layout_gravity="center_vertical"
android:layout_width="39dp" android:minWidth="39dp"
android:layout_height="wrap_content" android:src="@drawable/icon_time"
android:id="@+id/image_select_time"></ImageView>
</LinearLayout>
</LinearLayout>
But now EditText takes up the entire width and closes the image.
How can I achieve that an EditText "ends" before an ImageView?
source
share