Changing background color of selected item in recyclerview:-
public void onBindViewHolder(final RecyclerView.ViewHolder holder, final int position) {
holder.tv1.setText(android_versionnames[position]);
holder.row_linearlayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
row_index=position;
notifyDataSetChanged();
}
});
if(row_index==position){
holder.row_linearlayout.setBackgroundColor(Color.parseColor("#567845"));
holder.tv1.setTextColor(Color.parseColor("#ffffff"));
}
else
{
holder.row_linearlayout.setBackgroundColor(Color.parseColor("#ffffff"));
holder.tv1.setTextColor(Color.parseColor("#000000"));
}
Java queries related to “Changing background color of selected item in recyclerview”
- how to change color of selected item in recyclerview
- how to change recyclerview selected item background color in kotlin
- change recyclerview item background color
- recyclerview change color of selected item
- how to change background color of selected item in recyclerview in android
- recyclerview change background color
- change item background color in recyclerview also change anthor item color
- recyclerview selected item background change
- how to change recyclerview selected item background color in android kotlin
- recyclerview in view background color change
- android studio recyclerview background color
- stet text color is selected item in recyclerview
- android single selected item color change in recyclear view
- how to change background color in recyclerview in android
- how to change the background color of selected item in recyclerview
- listview change item background color
- change background color of recyclerview
- recyclerview item color change backgroundtintcolot programmatically
- set background color for only currently clicked item in recycler view list
- my recycler view change background color
- changing background color of selected item in recyclerview
- recyclerview with individual background color on item selected
- change background of selected item in recyclerview android
- how to set background color in recyclerview
- how to adjust background color in recyclerview
- recycler view in android .setbackground color
- recyclerview background color
- recyclerview android example item background color
- android code to set background color in recycler viewadapter
- how to change recyclerview selected item background color in android java
- recyclerview set background color
- background color per recyclerview item
- viewholder.itemview.setbackground
- android recyclerview change background color selected item
- change recyclerview item background color on click
- how to change recyclerview selected item background color in android
- how to set background color in recyclerview dynamically
- recyclerview item color change backgroundtintcolor programmatically
- set item text color is selected item in recyclerview
- how to change recyclerview selected item background color in android
- recyclerview change background color on click
- how to change on click specific background color on recyclerview android
- how to change background color on click in recyclerview android
- android recyclerview selected item background color change
- how to set defoult background color in recyclerview
- recyclerview change all background color
- how to change div background color onclick in recyclerview android
- android code to set background color in recycler view adapter
- change background color recyclerview item runtime android
- change item background color in recyclerview also change another item color
- change recyclerview background color
- on recyclear view item click background color change android programmatically
- android recyclerview change background color selected item programmatically
- set background color of recyclerview android
- change background color of recyclerview item
- recyclerview item color change backgroundcolor tint programmatically
- item in recyclerview showing background color
- how to change background of selected item in recyclerview in android
0 Comments
Post a Comment