Skip to content Skip to sidebar Skip to footer

Change The Alpha Of Recyclerview Item With Beacon Detection

In a Fragment I have a list of items construct with RecyclerView (adapter and viewholder). Each item of the list is linked with a estimote beacon. So i want to highlight the item v

Solution 1:

Finally i access to the layout alpha with the object SCard in the adapater :

In the activity i set the alpha

card.setField_2(0.5F);

In the viewholder i add the setter

 public void setItemCardField2(float alpha) {
        swipeLayout.setAlpha(alpha);
    }

And the adapter make the job

final ShowroomCard card = mItemList.get(position);
viewHolder.setItemCardField2(card.getField_2());

Post a Comment for "Change The Alpha Of Recyclerview Item With Beacon Detection"