Get multiple edittext results in a Recyclerview

Asked

Viewed 60 times

-1

I have a recyclerview, being that I am creating for each item in the list, an Edittext(via XML). Since the purpose of that edittext is to be filled with the amount of ITEMS that is desired. Soon after, I will call a method where I must pass each item of the list, with the correct amount according to the Edit of that position. The problem is, that every time I execute an edittext action, it always passes the list items, but with the repeated quantity field, all the same. I would need to take the right value by the position of the Adapter, via JAVA, but I don’t know how to implement.

  • 1

    Hello Souza! Please edit your question to include the code you are using. This way it will be easier to help you.

1 answer

0

Souza,

You must create an Adapter, and in the getView method you define what should be displayed at each recyclerview position.

public class ExemploAdapter extends BaseAdapter {
    @Override
    public int getCount() {
        return 0;
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        return null;
    }
}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.