Added default email address hint

pull/194/head
M66B 4 years ago
parent 1d08a823dd
commit 29afa5690e

@ -32,6 +32,7 @@ import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.Spinner;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@ -52,6 +53,7 @@ public class FragmentDialogIdentity extends FragmentDialogBase {
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
View dview = LayoutInflater.from(getContext()).inflate(R.layout.dialog_identity, null);
final Spinner spIdentity = dview.findViewById(R.id.spIdentity);
final TextView tvPrimaryHint = dview.findViewById(R.id.tvPrimaryHint);
final CheckBox cbNotAgain = dview.findViewById(R.id.cbNotAgain);
final Button btnFix = dview.findViewById(R.id.btnFix);
final Group grpIdentities = dview.findViewById(R.id.grpIdentities);
@ -79,6 +81,14 @@ public class FragmentDialogIdentity extends FragmentDialogBase {
}
});
tvPrimaryHint.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(getContext(), ActivitySetup.class)
.putExtra("manual", true));
}
});
cbNotAgain.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {

@ -49,6 +49,7 @@ import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.PopupMenu;
import androidx.constraintlayout.widget.Group;
import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.Observer;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.preference.PreferenceManager;
@ -90,13 +91,17 @@ public class FragmentSetup extends FragmentBase {
private int colorWarning;
private Drawable check;
private boolean manual = BuildConfig.DEBUG;
private boolean manual = false;
@Override
@Nullable
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
setSubtitle(R.string.title_setup);
FragmentActivity activity = getActivity();
if (activity != null)
manual = activity.getIntent().getBooleanExtra("manual", false);
textColorPrimary = Helper.resolveColor(getContext(), android.R.attr.textColorPrimary);
colorWarning = Helper.resolveColor(getContext(), R.attr.colorWarning);
check = getContext().getDrawable(R.drawable.twotone_check_24);

@ -34,6 +34,20 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/pbWait" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvPrimaryHint"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:drawableEnd="@drawable/twotone_settings_24"
android:drawablePadding="6dp"
android:text="@string/title_default_composable"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/spIdentity" />
<CheckBox
android:id="@+id/cbNotAgain"
android:layout_width="wrap_content"
@ -42,7 +56,7 @@
android:text="@string/title_no_ask_again"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/spIdentity" />
app:layout_constraintTop_toBottomOf="@id/tvPrimaryHint" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvNoIdenties"

@ -710,6 +710,7 @@
<string name="title_no_inbox">Inbox not found</string>
<string name="title_no_drafts">No drafts folder</string>
<string name="title_no_junk_folder">There is no spam folder selected for this account</string>
<string name="title_default_composable">The default email address is determined by the primary identity of the primary account</string>
<string name="title_no_composable">Sending emails requires an identity to be configured, and a drafts folder to be selected in the account settings</string>
<string name="title_no_standard">This provider uses a proprietary email protocol and therefore it is not possible to use third party email clients</string>
<string name="title_no_idle">This provider does not support push messages. This will delay reception of new messages and increase battery usage.</string>

Loading…
Cancel
Save