1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-31 20:25:38 +00:00

Refactoring

This commit is contained in:
M66B 2021-11-09 10:24:02 +01:00
parent 9d1176ec5f
commit da8fd555bf

View file

@ -1540,9 +1540,10 @@ public class FragmentCompose extends FragmentBase {
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
inflater.inflate(R.menu.menu_compose, menu);
PopupMenuLifecycle.insertIcons(getContext(), menu);
final Context context = getContext();
PopupMenuLifecycle.insertIcons(context, menu);
LayoutInflater infl = LayoutInflater.from(getContext());
LayoutInflater infl = LayoutInflater.from(context);
View v = infl.inflate(R.layout.action_button_text, null);
v.setId(View.generateViewId());
@ -1560,7 +1561,8 @@ public class FragmentCompose extends FragmentBase {
ib.getLocationOnScreen(pos);
int dp24 = Helper.dp2pixels(v.getContext(), 24);
Toast toast = ToastEx.makeTextBw(getContext(), getString(R.string.title_encrypt), Toast.LENGTH_LONG);
Toast toast = ToastEx.makeTextBw(v.getContext(),
getString(R.string.title_encrypt), Toast.LENGTH_LONG);
toast.setGravity(Gravity.TOP | Gravity.START, pos[0], pos[1] + dp24);
toast.show();
return true;