I am trying to align the ImageView inside the Autocomplete textView. I did this but the ImageView appears below the AutocomplteTextView. I changed the width of textView but same problem arises. I am looking for something like this:
Is there any way I can achieve this?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/relativeLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.kalpu.placepick.SearchFragment">
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<AutoCompleteTextView
android:id="@+id/acTextView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:completionHint="From"
android:dropDownHeight="match_parent"
android:hint="From"
android:visibility="visible"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@id/image"
android:padding="5dp"
android:layout_alignTop="@id/acTextView1"
android:layout_alignBottom="@id/acTextView1"
android:layout_alignRight="@id/acTextView1"
android:src="@mipmap/ic_arrow_drop_down"
/>
<AutoCompleteTextView
android:id="@+id/acTextView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/acTextView1"
android:completionHint="From"
android:dropDownHeight="match_parent"
android:hint="Intermediate (Optional) "
android:paddingTop="50dp"
android:visibility="visible" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@id/image"
android:padding="5dp"
android:layout_alignTop="@id/acTextView2"
android:layout_alignBottom="@id/acTextView2"
android:layout_alignRight="@id/acTextView1"
android:src="@mipmap/ic_arrow_drop_down"
/>
</LinearLayout>
</RelativeLayout>