MyActivity coord.xml:
<CoordinatorLayout>
id:coordID
<RelativeL>
...
<FAB>
RVAdapter.java
...
@Override
public void onItemDismiss(int position) {
...
notifyItemRemoved(position);
LayoutInflater inflater = (LayoutInflater) MyActivity.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View v = inflater.inflate(R.layout.coord, null);
Snackbar.make(v.findViewById(R.id.coordID), "TEXT", Snackbar.LENGTH_LONG).show();
}
This is a method for swiping to delete an item from recycler view list, in a custom class (RVAdapter.java) and after its deleted, Snackbar should appear and set action for UNDO. But, when I delete an item, nothing happends. Snackbar doesnt show up. Im not so sure if I set views correctly, but I dont know how to do it differently