|
|
|
@ -20,6 +20,7 @@ package eu.faircode.email;
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import android.Manifest;
|
|
|
|
|
import android.animation.Animator;
|
|
|
|
|
import android.annotation.SuppressLint;
|
|
|
|
|
import android.annotation.TargetApi;
|
|
|
|
|
import android.app.Dialog;
|
|
|
|
@ -68,9 +69,11 @@ import android.view.MenuItem;
|
|
|
|
|
import android.view.MotionEvent;
|
|
|
|
|
import android.view.TouchDelegate;
|
|
|
|
|
import android.view.View;
|
|
|
|
|
import android.view.ViewAnimationUtils;
|
|
|
|
|
import android.view.ViewConfiguration;
|
|
|
|
|
import android.view.ViewGroup;
|
|
|
|
|
import android.view.ViewStub;
|
|
|
|
|
import android.view.animation.AccelerateDecelerateInterpolator;
|
|
|
|
|
import android.webkit.DownloadListener;
|
|
|
|
|
import android.webkit.WebSettings;
|
|
|
|
|
import android.webkit.WebView;
|
|
|
|
@ -226,8 +229,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
|
|
|
|
|
public class ViewHolder extends RecyclerView.ViewHolder implements
|
|
|
|
|
View.OnClickListener, View.OnLongClickListener, BottomNavigationView.OnNavigationItemSelectedListener, View.OnKeyListener {
|
|
|
|
|
private View card;
|
|
|
|
|
private View view;
|
|
|
|
|
private View vwRipple;
|
|
|
|
|
|
|
|
|
|
private View vwColor;
|
|
|
|
|
private ImageView ivExpander;
|
|
|
|
@ -332,8 +335,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
ViewHolder(final View itemView) {
|
|
|
|
|
super(itemView);
|
|
|
|
|
|
|
|
|
|
card = itemView.findViewById(R.id.card);
|
|
|
|
|
view = itemView.findViewById(R.id.clItem);
|
|
|
|
|
vwRipple = itemView.findViewById(R.id.vwRipple);
|
|
|
|
|
|
|
|
|
|
vwColor = itemView.findViewById(R.id.vwColor);
|
|
|
|
|
ivExpander = itemView.findViewById(R.id.ivExpander);
|
|
|
|
@ -1472,8 +1475,20 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
onToggleMessage(message);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
vwRipple.setPressed(true);
|
|
|
|
|
vwRipple.setPressed(false);
|
|
|
|
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
|
|
|
|
|
// Unreveal
|
|
|
|
|
int cx = card.getWidth() / 2;
|
|
|
|
|
int cy = card.getHeight() / 2;
|
|
|
|
|
int r = Math.max(card.getWidth(), card.getHeight());
|
|
|
|
|
Animator anim = ViewAnimationUtils.createCircularReveal(card, cx, cy, r, 0);
|
|
|
|
|
anim.setInterpolator(new AccelerateDecelerateInterpolator());
|
|
|
|
|
anim.setDuration(context.getResources().getInteger(android.R.integer.config_mediumAnimTime));
|
|
|
|
|
anim.start();
|
|
|
|
|
} else {
|
|
|
|
|
// selectableItemBackground
|
|
|
|
|
card.setClickable(true);
|
|
|
|
|
card.setPressed(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (EntityFolder.DRAFTS.equals(message.folderType) && message.visible == 1)
|
|
|
|
|
context.startActivity(
|
|
|
|
|