Reputation: 1505
I have a problem with no Enter Button on my Keyboard. Where can I set this or what should I do to have here enter Button?? Any Tips?
xml code to edittext
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<EditText
android:id="@+id/bookId"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:hint="@string/hint"
android:inputType="number"
android:padding="16dp" />
<Button
android:id="@+id/parameterBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="16dp"
android:text="@string/go" />
</LinearLayout>
</LinearLayout>
Upvotes: 0
Views: 596
Reputation: 590
Just add imeOptions
property to flagNoEnterAction
in editText
like below.
<EditText
android:id="@+id/bookId"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:hint="@string/hint"
android:inputType="number"
android:padding="16dp"
android:imeOptions="flagNoEnterAction" />
Upvotes: 1