Skip to content

Instantly share code, notes, and snippets.

@malikkurosaki
Created October 23, 2019 16:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malikkurosaki/140e80dba9c64b8c428e5900918bdf61 to your computer and use it in GitHub Desktop.
Save malikkurosaki/140e80dba9c64b8c428e5900918bdf61 to your computer and use it in GitHub Desktop.
mendapatkan view dari recyclerview

mndapatkan view dari recycler view

 containerPilihSuara.post(()->{
                    View vi = containerPilihSuara.findViewHolderForPosition(posisi).itemView;
                    CardView cardView = vi.findViewById(R.id.wadahPilihSuara);
                    for (int i =0;i<adapterPilihSuara.getItemCount();i++){
                        View vi2 = containerPilihSuara.findViewHolderForPosition(i).itemView;
                        CardView cv = vi2.findViewById(R.id.wadahPilihSuara);
                        cv.setCardBackgroundColor(getResources().getColor(R.color.color1));
                    }
                    cardView.setCardBackgroundColor(getResources().getColor(R.color.color3));
                });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment