Padlock disable state

This commit is contained in:
M66B 2020-11-13 18:05:30 +01:00
parent 40bd3299a1
commit b1825316c3
1 changed files with 4 additions and 0 deletions

View File

@ -1370,10 +1370,14 @@ public class FragmentCompose extends FragmentBase {
menu.findItem(R.id.menu_clear).setEnabled(state == State.LOADED);
int colorEncrypt = Helper.resolveColor(getContext(), R.attr.colorEncrypt);
View v = menu.findItem(R.id.menu_encrypt).getActionView();
ImageButton ib = v.findViewById(R.id.button);
TextView tv = v.findViewById(R.id.text);
v.setAlpha(state == State.LOADED ? 1f : Helper.LOW_LIGHT);
ib.setEnabled(state == State.LOADED);
if (EntityMessage.PGP_SIGNONLY.equals(encrypt) || EntityMessage.SMIME_SIGNONLY.equals(encrypt)) {
ib.setImageResource(R.drawable.twotone_gesture_24);
ib.setImageTintList(null);