Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Navigation (Next) with EditText in a ListView / RecyclerView

I have EditText inside RecyclerView ( Before I had ListView, and I had the same problem)

So each cell, I have to fill my EditText and then click Next to get to the next EditText.

Thing is Next is working for the visible rows. So after 7 rows, button Done appears.

Is it a way to bypass it?

I tried with:

android:imeOptions="actionNext"

with no result

Otherwise, a good way should be to scroll 1 element each time I click Next. Is there any way to do it???

Tx

like image 854
Juliatzin Avatar asked Jul 14 '15 23:07

Juliatzin


1 Answers

Hey Friend,

First at all, I am telling you the reason why it's happening.

As we ALL KNOW that RecyclerView is latest update version as Compare with ListView in Android.

 - **RecycleView**
There ViewHolder Class we have to declare to use RecycleView
& BindHolder is method of RecycleView which is going to Bind the Data as per List of data with postion of ArrayList/List


But Main thing is that..
In Recycleview...   only that portion of data is binded as per your Screen Portion like 10 item at a time...
        when you scroll the recycle view the holder is clean them and fetch new data from list/arraylist with respect postion.


Holder is going to reuse its cell that y ..its calling Re-Cycle-View....means using same cell/row for display the new record.....

try to do debug test....you will understand what i am trying to say..


that's a reason ,  when you enter the text in Editext, that portion of YourScreen  data is correct in order..

but when you scroll down the Recycleview ....data will mismatch with blank space...

because.....RecycleView is using its older View/Holder for binding new Incoming data...

if you have still confuse ....Mail me

Zafar Hussain
[email protected]
8080013893 
like image 166
Zafar Hussain Avatar answered Oct 10 '22 08:10

Zafar Hussain