use of org.thoughtcrime.securesms.components.recyclerview.DeleteItemAnimator in project Signal-Android by WhisperSystems.
the class ConversationListFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) {
final View view = inflater.inflate(R.layout.conversation_list_fragment, container, false);
reminderView = ViewUtil.findById(view, R.id.reminder);
list = ViewUtil.findById(view, R.id.list);
fab = ViewUtil.findById(view, R.id.fab);
if (archive)
fab.setVisibility(View.GONE);
else
fab.setVisibility(View.VISIBLE);
reminderView.setOnDismissListener(new OnDismissListener() {
@Override
public void onDismiss() {
updateReminders();
}
});
list.setHasFixedSize(true);
list.setLayoutManager(new LinearLayoutManager(getActivity()));
list.setItemAnimator(new DeleteItemAnimator());
new ItemTouchHelper(new ArchiveListenerCallback()).attachToRecyclerView(list);
return view;
}
Aggregations