Skip to content

How to update card from adapter? #69

Open
@Slake07

Description

@Slake07

I have a button of like on card adapter. on click of button, i am updating count of likes. i want to know how can i update it. i already tried below things. but it updates wrong card.

private void updateView(int index, CardModel model){
Log.e("CARD", "first position: " +mCardContainer.getLastVisiblePosition());
Log.e("CARD", "position: " +index);
View v = mCardContainer.getChildAt(index -
mCardContainer.getLastVisiblePosition());

// if(v == null)
// return;

    TextView someText = (TextView) v.findViewById(R.id.row_card_tvDiscription);
    Log.e("CARD", "desc: " + someText.getText().toString());

// someText.setText("8");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions