mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-14 13:03:13 +02:00
Added B/W toast
This commit is contained in:
@@ -68,6 +68,7 @@ import android.text.style.ParagraphStyle;
|
||||
import android.text.style.QuoteSpan;
|
||||
import android.text.style.URLSpan;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Gravity;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
@@ -1330,6 +1331,19 @@ public class FragmentCompose extends FragmentBase {
|
||||
onMenuEncrypt();
|
||||
}
|
||||
});
|
||||
ib.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
int[] pos = new int[2];
|
||||
ib.getLocationOnScreen(pos);
|
||||
int dp24 = Helper.dp2pixels(v.getContext(), 24);
|
||||
|
||||
Toast toast = ToastEx.makeTextBw(getContext(), getString(R.string.title_encrypt), Toast.LENGTH_LONG);
|
||||
toast.setGravity(Gravity.TOP | Gravity.START, pos[0], pos[1] + dp24);
|
||||
toast.show();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
super.onCreateOptionsMenu(menu, inflater);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user