0

when i move from one EditText to next EditText through next button on softkeyboard , softkeyboard cant open until or unless i have to touch the edit text. WHAT I WANT : when user click the next button which is on softkeyboard , on next edittext the softkeyboard will appear... The code which i am currently using

 etRegisterLName.setOnFocusChangeListener(new OnFocusChangeListener() {          

        public void onFocusChange(View v, boolean hasFocus) {
            //if (!(hasFocus)) {
               // code to execute when EditText loses focus
                Toast.makeText(getActivity(), "focus method", Toast.LENGTH_LONG).show();
                //etRegisterLName.requestFocus();
            //}
        }
    });

my manifest of this activity

   <activity
        android:name="com.ukcl.driverapp.RegisterActivity"
        android:screenOrientation="portrait"

        android:windowSoftInputMode="stateAlwaysVisible|stateHidden" >
    </activity>
robinHood013
  • 209
  • 1
  • 2
  • 15

1 Answers1

0

Define cursorVisible property in your edit text like this.

<EditText                
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:imeOptions="actionNext"
  android:cursorVisible="true"/>
Ravindra Kushwaha
  • 7,846
  • 14
  • 53
  • 103