|
|
|
@ -310,7 +310,15 @@ public class FragmentMessages extends FragmentBase {
|
|
|
|
|
LinearLayoutManager llm = new LinearLayoutManager(getContext());
|
|
|
|
|
rvMessage.setLayoutManager(llm);
|
|
|
|
|
|
|
|
|
|
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL);
|
|
|
|
|
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL) {
|
|
|
|
|
@Override
|
|
|
|
|
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
|
|
|
|
|
if (view.findViewById(R.id.clItem).getVisibility() == View.GONE)
|
|
|
|
|
outRect.setEmpty();
|
|
|
|
|
else
|
|
|
|
|
super.getItemOffsets(outRect, view, parent, state);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
itemDecorator.setDrawable(getContext().getDrawable(R.drawable.divider));
|
|
|
|
|
rvMessage.addItemDecoration(itemDecorator);
|
|
|
|
|
|
|
|
|
|