mirror of https://github.com/M66B/FairEmail.git
Added hint about action bar
This commit is contained in:
parent
2b2916b558
commit
4b761d2235
|
@ -385,6 +385,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
private ImageButton ibUndo;
|
private ImageButton ibUndo;
|
||||||
private ImageButton ibMore;
|
private ImageButton ibMore;
|
||||||
private TextView tvSignedData;
|
private TextView tvSignedData;
|
||||||
|
private ImageButton ibActionBarHint;
|
||||||
|
private Group grpActionBarHint;
|
||||||
|
|
||||||
private TextView tvBody;
|
private TextView tvBody;
|
||||||
private View wvBody;
|
private View wvBody;
|
||||||
|
@ -571,6 +573,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
ibUndo = vsBody.findViewById(R.id.ibUndo);
|
ibUndo = vsBody.findViewById(R.id.ibUndo);
|
||||||
ibMore = vsBody.findViewById(R.id.ibMore);
|
ibMore = vsBody.findViewById(R.id.ibMore);
|
||||||
tvSignedData = vsBody.findViewById(R.id.tvSignedData);
|
tvSignedData = vsBody.findViewById(R.id.tvSignedData);
|
||||||
|
ibActionBarHint = vsBody.findViewById(R.id.ibActionBarHint);
|
||||||
|
grpActionBarHint = vsBody.findViewById(R.id.grpActionBarHint);
|
||||||
|
|
||||||
tvBody = vsBody.findViewById(R.id.tvBody);
|
tvBody = vsBody.findViewById(R.id.tvBody);
|
||||||
wvBody = vsBody.findViewById(R.id.wvBody);
|
wvBody = vsBody.findViewById(R.id.wvBody);
|
||||||
|
@ -648,6 +652,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
ibVerify.setOnClickListener(this);
|
ibVerify.setOnClickListener(this);
|
||||||
ibUndo.setOnClickListener(this);
|
ibUndo.setOnClickListener(this);
|
||||||
ibMore.setOnClickListener(this);
|
ibMore.setOnClickListener(this);
|
||||||
|
ibActionBarHint.setOnClickListener(this);
|
||||||
|
|
||||||
ibDownloading.setOnClickListener(this);
|
ibDownloading.setOnClickListener(this);
|
||||||
|
|
||||||
|
@ -716,6 +721,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
ibVerify.setOnClickListener(null);
|
ibVerify.setOnClickListener(null);
|
||||||
ibUndo.setOnClickListener(null);
|
ibUndo.setOnClickListener(null);
|
||||||
ibMore.setOnClickListener(null);
|
ibMore.setOnClickListener(null);
|
||||||
|
ibActionBarHint.setOnClickListener(null);
|
||||||
|
|
||||||
ibDownloading.setOnClickListener(null);
|
ibDownloading.setOnClickListener(null);
|
||||||
|
|
||||||
|
@ -1144,6 +1150,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
ibUndo.setVisibility(View.GONE);
|
ibUndo.setVisibility(View.GONE);
|
||||||
ibMore.setVisibility(View.GONE);
|
ibMore.setVisibility(View.GONE);
|
||||||
tvSignedData.setVisibility(View.GONE);
|
tvSignedData.setVisibility(View.GONE);
|
||||||
|
grpActionBarHint.setVisibility(View.GONE);
|
||||||
|
|
||||||
tvBody.setVisibility(View.GONE);
|
tvBody.setVisibility(View.GONE);
|
||||||
wvBody.setVisibility(View.GONE);
|
wvBody.setVisibility(View.GONE);
|
||||||
|
@ -1298,6 +1305,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
ibUndo.setVisibility(EntityFolder.OUTBOX.equals(message.folderType) ? View.VISIBLE : View.GONE);
|
ibUndo.setVisibility(EntityFolder.OUTBOX.equals(message.folderType) ? View.VISIBLE : View.GONE);
|
||||||
ibMore.setVisibility(EntityFolder.OUTBOX.equals(message.folderType) ? View.GONE : View.VISIBLE);
|
ibMore.setVisibility(EntityFolder.OUTBOX.equals(message.folderType) ? View.GONE : View.VISIBLE);
|
||||||
tvSignedData.setVisibility(View.GONE);
|
tvSignedData.setVisibility(View.GONE);
|
||||||
|
grpActionBarHint.setVisibility(View.GONE);
|
||||||
|
|
||||||
// Addresses
|
// Addresses
|
||||||
ibExpanderAddress.setImageLevel(show_addresses ? 0 /* less */ : 1 /* more */);
|
ibExpanderAddress.setImageLevel(show_addresses ? 0 /* less */ : 1 /* more */);
|
||||||
|
@ -1872,6 +1880,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
|
|
||||||
boolean signed_data = args.getBoolean("signed_data");
|
boolean signed_data = args.getBoolean("signed_data");
|
||||||
tvSignedData.setVisibility(signed_data ? View.VISIBLE : View.GONE);
|
tvSignedData.setVisibility(signed_data ? View.VISIBLE : View.GONE);
|
||||||
|
|
||||||
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
|
boolean message_bar_removed = prefs.getBoolean("message_bar_removed", true);
|
||||||
|
grpActionBarHint.setVisibility(message_bar_removed ? View.GONE : View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -2337,6 +2349,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
case R.id.ibMore:
|
case R.id.ibMore:
|
||||||
onActionMore(message);
|
onActionMore(message);
|
||||||
break;
|
break;
|
||||||
|
case R.id.ibActionBarHint:
|
||||||
|
onActionBarHint();
|
||||||
|
break;
|
||||||
|
|
||||||
case R.id.ibDownloading:
|
case R.id.ibDownloading:
|
||||||
Helper.viewFAQ(context, 15);
|
Helper.viewFAQ(context, 15);
|
||||||
|
@ -3199,6 +3214,12 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
popupMenu.show();
|
popupMenu.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void onActionBarHint() {
|
||||||
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
|
prefs.edit().putBoolean("message_bar_removed", true).apply();
|
||||||
|
grpActionBarHint.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
private class TouchHandler extends ArrowKeyMovementMethod {
|
private class TouchHandler extends ArrowKeyMovementMethod {
|
||||||
private TupleMessageEx message;
|
private TupleMessageEx message;
|
||||||
|
|
||||||
|
|
|
@ -249,6 +249,7 @@ public class ApplicationEx extends Application {
|
||||||
editor.remove("first");
|
editor.remove("first");
|
||||||
} else if (version < 999) {
|
} else if (version < 999) {
|
||||||
editor.remove("actionbar");
|
editor.remove("actionbar");
|
||||||
|
editor.putBoolean("message_bar_removed", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BuildConfig.DEBUG && false) {
|
if (BuildConfig.DEBUG && false) {
|
||||||
|
|
|
@ -152,5 +152,36 @@
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/ibVerify" />
|
app:layout_constraintTop_toBottomOf="@id/ibFull" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/ibActionBarHint"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:contentDescription="@string/title_no_format"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/tvActionBarHint"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/tvActionBarHint"
|
||||||
|
app:srcCompat="@drawable/baseline_close_24" />
|
||||||
|
|
||||||
|
<eu.faircode.email.FixedTextView
|
||||||
|
android:id="@+id/tvActionBarHint"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="6dp"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:layout_marginEnd="6dp"
|
||||||
|
android:text="@string/title_message_bar_hint"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
|
android:textStyle="italic"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/ibActionBarHint"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvSignedData" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Group
|
||||||
|
android:id="@+id/grpActionBarHint"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:constraint_referenced_ids="ibActionBarHint,tvActionBarHint" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
@ -734,7 +734,7 @@
|
||||||
<string name="title_ask_help">Help improve FairEmail</string>
|
<string name="title_ask_help">Help improve FairEmail</string>
|
||||||
<string name="title_ask_reporting">Send error reports?</string>
|
<string name="title_ask_reporting">Send error reports?</string>
|
||||||
<string name="title_reporting_why">Error reporting will help improve FairEmail</string>
|
<string name="title_reporting_why">Error reporting will help improve FairEmail</string>
|
||||||
<string name="title_reply_hint">You can reply to all, forward, etc via the double arrow action menu just below the message header</string>
|
<string name="title_message_bar_hint">The actions for archiving and trashing messages were merged in the bottom action bar and all answer actions have been made available via the answer button</string>
|
||||||
|
|
||||||
<string name="title_ask_review">Please review FairEmail</string>
|
<string name="title_ask_review">Please review FairEmail</string>
|
||||||
<string name="title_ask_review_rationale">
|
<string name="title_ask_review_rationale">
|
||||||
|
|
Loading…
Reference in New Issue