jeudi 29 août 2019

How to add views inside the edittext in android?

I need to add two views in an edit text like in the screenshot

    <EditText android:id="@+id/id_search_EditText"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:singleLine="true"
        android:paddingRight="40dp"
        android:hint="Enter your feelings and connect" />

    <Cardview 
        android:id="@+id/id_search_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignTop="@+id/id_search_EditText"
        android:layout_alignBottom="@+id/id_search_EditText"
        android:layout_alignRight="@+id/id_search_EditText"
        android:background="@drawable/ic_shared"/>

</RelativeLayout>

This is what I tried...

Aucun commentaire:

Enregistrer un commentaire