I have created the following EditText with ImageButton:
By using the following code:
<RelativeLayout
android:id="@+id/relativeLayout"
android:layout_width="wrap_content"
android:layout_height="0dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_percent="0.12">
<EditText
android:id="@+id/txt_search"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="24dp"
android:layout_marginTop="24dp"
android:layout_marginRight="24dp"
android:layout_marginBottom="8dp"
android:paddingLeft="24dp"
android:textSize="14sp"
android:background="@drawable/et_rounded"
android:hint="Search for book or author"
android:textColorHint="@color/colorGray"
app:layout_constraintTop_toTopOf="parent"/>
<ImageButton
android:id="@+id/btn_search"
android:layout_width="48dp"
android:layout_height="match_parent"
android:layout_marginLeft="24dp"
android:layout_marginTop="24dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"
android:layout_alignRight="@id/txt_search"
android:background="@android:color/transparent"
android:src="@drawable/ic_search_black_24dp"/>
</RelativeLayout>
There are two things that im trying to get:
1) Is there an option to add into the keyboard a search button that once I click on this button it will search for results just like when I search in some site for example:
2) Is there a way to make something like popup menu that will offer few searching results once I type in the edit text?
Thank you