Adding buttons inside of edit text android
<p>I have created a relative layout and placed list view on top, editable text below list view and 1 button on the left of editable text and one button on the right of editable text.</p>
<p>Looks something like this.
<a href="https://i.stack.imgur.com/m68ky.png" rel="nofollow noreferrer">HOW ITS LOOKING AT THE MOMENT</a></p>
<p>But I want the buttons to be placed inside the editable text view. Can someone please help, really appreciate your time.</p>
<pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;RelativeLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    xmlns:tools=&quot;http://schemas.android.com/tools&quot;
    android:id=&quot;@+id/activity_main&quot;
    android:layout_width=&quot;match_parent&quot;
    android:layout_height=&quot;match_parent&quot;
    android:paddingBottom=&quot;@dimen/activity_vertical_margin&quot;
    android:paddingLeft=&quot;@dimen/activity_horizontal_margin&quot;
    android:paddingRight=&quot;@dimen/activity_horizontal_margin&quot;
    android:paddingTop=&quot;@dimen/activity_vertical_margin&quot;
    tools:context=&quot;app.com.date.MainActivity&quot;&gt;

    &lt;ListView
        android:layout_width=&quot;match_parent&quot;
        android:layout_height=&quot;match_parent&quot;
        android:layout_alignParentTop=&quot;true&quot;
        android:layout_alignParentStart=&quot;true&quot;
        android:layout_above=&quot;@+id/button1&quot;
        android:id=&quot;@+id/listview1&quot;
        android:stackFromBottom=&quot;true&quot;
        android:transcriptMode=&quot;alwaysScroll&quot;
        android:dividerHeight=&quot;0dp&quot;
        android:divider=&quot;@null&quot; /&gt;

    &lt;EditText
        android:layout_width=&quot;wrap_content&quot;
        android:layout_height=&quot;wrap_content&quot;
        android:inputType=&quot;text&quot;
        android:ems=&quot;10&quot;
        android:id=&quot;@+id/text1&quot;
        android:layout_toStartOf=&quot;@+id/button1&quot;
        android:textAppearance=&quot;@style/TextAppearance.AppCompat&quot;
        android:freezesText=&quot;true&quot;
        android:textSize=&quot;12sp&quot;
        android:fontFamily=&quot;sans-serif&quot;
        android:layout_alignParentBottom=&quot;true&quot;
        android:layout_below=&quot;@+id/listview1&quot; /&gt;

    &lt;Button
        android:text=&quot;Button&quot;
        android:layout_width=&quot;15dp&quot;
        android:layout_height=&quot;15dp&quot;
        android:id=&quot;@+id/imageButton&quot;
        android:layout_alignParentBottom=&quot;true&quot;
        android:layout_alignParentStart=&quot;true&quot;
        android:layout_below=&quot;@+id/listview1&quot;
        android:layout_toStartOf=&quot;@+id/text1&quot; /&gt;

    &lt;Button
        android:text=&quot;Button&quot;
        android:layout_width=&quot;wrap_content&quot;
        android:layout_height=&quot;wrap_content&quot;
        android:id=&quot;@+id/button1&quot;
        android:layout_marginEnd=&quot;21dp&quot;
        android:layout_alignParentBottom=&quot;true&quot;
        android:layout_alignParentEnd=&quot;true&quot; /&gt;
&lt;/RelativeLayout&gt;
</code></pre>
<p>but, it should look like this</p>
<p><a href="https://i.stack.imgur.com/CrZ1w.png" rel="nofollow noreferrer">HOW IT SHOULD LOOK</a></p>
<p>Thanks for reading . appreciate your time.</p>