I have a ViewHolder and in bindView() method set a OnLongClickListener.
When I rotate device and long click on list item java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState exception occurs.
I've already override show() method and tested commitAllowingStateLoss but still get exception.
Anyone can help me?
public void bindView(final FragmentActivity activity) {
...
itemView.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
FingerprintDialogFragment fingerprintDialogFragment = FingerprintDialogFragment.getInstance(DecreeItemViewHolder.this);
fingerprintDialogFragment.show(activity.getSupportFragmentManager(), FINGERPRINT_DIALOG_TAG);
return true;
});
}
}