Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Next Button in Keyboard is not showing

Tags:

android

I want when user type then instead of arrow key it should show the next button in keyboard. So user not need to press the back to input next edittext.

Added the Layout:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="match_parent"
    android:background="#D5D5D5"
    android:orientation="vertical" >

    <FrameLayout
        android:id="@+id/topLinearLayout"
        android:layout_width="fill_parent"
        android:layout_height="45dip"
        android:background="@drawable/bar" >

        <ImageView
            android:id="@+id/new_quote_imageView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:src="@drawable/new_quote_bar" />

        <TextView
            android:id="@+id/contactUs"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_gravity="center"
            android:gravity="center"
            android:text="@string/contact_us"
            android:textColor="@android:color/white"
            android:textSize="15sp" />
    </FrameLayout>

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="match_parent"
        android:gravity="center_vertical"
        android:orientation="vertical" >

        <ScrollView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" >

            <LinearLayout
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:padding="10dip" >

                <LinearLayout
                    android:layout_width="fill_parent"
                    android:layout_height="0dip"
                    android:layout_weight=".7"
                    android:background="#EEEBE6"
                    android:orientation="vertical"
                    android:padding="15dip" >

                    <TextView
                        android:id="@+id/nameTextView"
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                        android:paddingLeft="5dip"
                        android:text="@string/name"
                        android:textColor="@android:color/black"
                        android:textSize="16sp" />

                    <EditText
                        android:id="@+id/nameEditText"
                        android:layout_width="fill_parent"
                        android:layout_height="40dip"
                        android:layout_marginTop="10dip" />

                    <TextView
                        android:id="@+id/emailTextView"
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                        android:paddingLeft="5dip"
                        android:text="@string/email"
                        android:textColor="@android:color/black"
                        android:textSize="16sp" />

                    <EditText
                        android:id="@+id/emailEditText"
                        android:layout_width="fill_parent"
                        android:layout_height="40dip"
                        android:layout_marginTop="10dip"
                        android:inputType="textEmailAddress" />

                    <TextView
                        android:id="@+id/commentsTextView"
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                        android:paddingLeft="5dip"
                        android:text="@string/comments"
                        android:textColor="@android:color/black"
                        android:textSize="16sp" />

                    <EditText
                        android:id="@+id/commentsEditText"
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="10dip"
                        android:lines="5" />

                    <View
                        android:layout_width="fill_parent"
                        android:layout_height="1dp"
                        android:layout_marginTop="5dip"
                        android:background="@android:color/darker_gray" />

                    <LinearLayout
                        android:layout_width="fill_parent"
                        android:layout_height="match_parent"
                        android:layout_marginBottom="10dip"
                        android:layout_marginTop="10dip"
                        android:gravity="right|center_vertical"
                        android:weightSum="1" >

                        <Button
                            android:id="@+id/submitButton"
                            android:layout_width="0dip"
                            android:layout_height="35dip"
                            android:layout_weight=".3"
                            android:background="@drawable/button_background"
                            android:text="@string/submit"
                            android:textColor="@android:color/white"
                            android:textSize="16sp" />
                    </LinearLayout>
                </LinearLayout>
            </LinearLayout>
        </ScrollView>
    </LinearLayout>

</LinearLayout>

Please help me for this.

Thanks in advance.

like image 780
user2695306 Avatar asked Aug 25 '13 10:08

user2695306


1 Answers

add this line to your edittext xml

android:singleLine="true"
like image 160
Aneh Thakur Avatar answered Sep 28 '22 20:09

Aneh Thakur