Added priority/sensitivy info buttons

pull/194/merge
M66B 3 years ago
parent 755bdaaaf2
commit 234343afe9

@ -323,6 +323,8 @@ public class FragmentCompose extends FragmentBase {
private static final int REQUEST_SEND = 14; private static final int REQUEST_SEND = 14;
private static final int REQUEST_PERMISSION = 15; private static final int REQUEST_PERMISSION = 15;
private static final String RFC4021 = "https://datatracker.ietf.org/doc/html/rfc4021";
private static ExecutorService executor = Helper.getBackgroundExecutor(1, "encrypt"); private static ExecutorService executor = Helper.getBackgroundExecutor(1, "encrypt");
@Override @Override
@ -6957,7 +6959,9 @@ public class FragmentCompose extends FragmentBase {
final Spinner spEncrypt = dview.findViewById(R.id.spEncrypt); final Spinner spEncrypt = dview.findViewById(R.id.spEncrypt);
final ImageButton ibEncryption = dview.findViewById(R.id.ibEncryption); final ImageButton ibEncryption = dview.findViewById(R.id.ibEncryption);
final Spinner spPriority = dview.findViewById(R.id.spPriority); final Spinner spPriority = dview.findViewById(R.id.spPriority);
final ImageButton ibPriority = dview.findViewById(R.id.ibPriority);
final Spinner spSensitivity = dview.findViewById(R.id.spSensitivity); final Spinner spSensitivity = dview.findViewById(R.id.spSensitivity);
final ImageButton ibSensitivity = dview.findViewById(R.id.ibSensitivity);
final TextView tvSendAt = dview.findViewById(R.id.tvSendAt); final TextView tvSendAt = dview.findViewById(R.id.tvSendAt);
final ImageButton ibSendAt = dview.findViewById(R.id.ibSendAt); final ImageButton ibSendAt = dview.findViewById(R.id.ibSendAt);
final CheckBox cbArchive = dview.findViewById(R.id.cbArchive); final CheckBox cbArchive = dview.findViewById(R.id.cbArchive);
@ -7220,6 +7224,13 @@ public class FragmentCompose extends FragmentBase {
} }
}); });
ibPriority.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Helper.view(v.getContext(), Uri.parse(RFC4021 + "#section-2.1.54"), true);
}
});
spSensitivity.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { spSensitivity.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override @Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
@ -7261,6 +7272,13 @@ public class FragmentCompose extends FragmentBase {
} }
}); });
ibSensitivity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Helper.view(v.getContext(), Uri.parse(RFC4021 + "#section-2.1.55"), true);
}
});
View.OnClickListener sendAt = new View.OnClickListener() { View.OnClickListener sendAt = new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {

@ -357,15 +357,17 @@
<eu.faircode.email.FixedImageButton <eu.faircode.email.FixedImageButton
android:id="@+id/ibEncryption" android:id="@+id/ibEncryption"
android:layout_width="wrap_content" android:layout_width="36dp"
android:layout_height="wrap_content" android:layout_height="36dp"
android:layout_marginTop="12dp" android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/title_send_at" android:contentDescription="@string/title_info"
android:tag="disable" android:padding="6dp"
android:tooltipText="@string/title_send_at" android:scaleType="fitCenter"
app:layout_constraintBottom_toBottomOf="@id/spEncrypt" android:tooltipText="@string/title_info"
app:layout_constraintBottom_toBottomOf="@+id/spEncrypt"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@drawable/twotone_info_24" /> app:srcCompat="@drawable/twotone_info_24"
app:tint="?attr/colorAccent" />
<eu.faircode.email.FixedTextView <eu.faircode.email.FixedTextView
android:id="@+id/tvPriority" android:id="@+id/tvPriority"
@ -385,10 +387,25 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="12dp" android:layout_marginEnd="12dp"
android:entries="@array/priorityNames" android:entries="@array/priorityNames"
app:layout_constraintEnd_toStartOf="@id/ibEncryption" app:layout_constraintEnd_toStartOf="@id/ibPriority"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvPriority" /> app:layout_constraintTop_toBottomOf="@id/tvPriority" />
<eu.faircode.email.FixedImageButton
android:id="@+id/ibPriority"
android:layout_width="36dp"
android:layout_height="36dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/title_info"
android:padding="6dp"
android:scaleType="fitCenter"
android:tooltipText="@string/title_info"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="@+id/spPriority"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@drawable/twotone_info_24"
app:tint="?attr/colorAccent" />
<eu.faircode.email.FixedTextView <eu.faircode.email.FixedTextView
android:id="@+id/tvSensitivity" android:id="@+id/tvSensitivity"
android:layout_width="0dp" android:layout_width="0dp"
@ -407,10 +424,25 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="12dp" android:layout_marginEnd="12dp"
android:entries="@array/sensitivityNames" android:entries="@array/sensitivityNames"
app:layout_constraintEnd_toStartOf="@id/ibEncryption" app:layout_constraintEnd_toStartOf="@id/ibSensitivity"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvSensitivity" /> app:layout_constraintTop_toBottomOf="@id/tvSensitivity" />
<eu.faircode.email.FixedImageButton
android:id="@+id/ibSensitivity"
android:layout_width="36dp"
android:layout_height="36dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/title_info"
android:padding="6dp"
android:scaleType="fitCenter"
android:tooltipText="@string/title_info"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="@+id/spSensitivity"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@drawable/twotone_info_24"
app:tint="?attr/colorAccent" />
<eu.faircode.email.FixedTextView <eu.faircode.email.FixedTextView
android:id="@+id/tvSendTitle" android:id="@+id/tvSendTitle"
android:layout_width="0dp" android:layout_width="0dp"

Loading…
Cancel
Save