mirror of https://github.com/M66B/FairEmail.git
Selecting an account is optional
This commit is contained in:
parent
146088170a
commit
0961481d88
|
@ -96,6 +96,7 @@ public class FragmentAccount extends FragmentBase {
|
|||
private Button btnAutoConfig;
|
||||
|
||||
private Button btnAuthorize;
|
||||
private TextView tvAuthorizeOptional;
|
||||
private EditText etHost;
|
||||
private RadioGroup rgEncryption;
|
||||
private CheckBox cbInsecure;
|
||||
|
@ -171,6 +172,7 @@ public class FragmentAccount extends FragmentBase {
|
|||
btnAutoConfig = view.findViewById(R.id.btnAutoConfig);
|
||||
|
||||
btnAuthorize = view.findViewById(R.id.btnAuthorize);
|
||||
tvAuthorizeOptional = view.findViewById(R.id.tvAuthorizeOptional);
|
||||
etHost = view.findViewById(R.id.etHost);
|
||||
etPort = view.findViewById(R.id.etPort);
|
||||
rgEncryption = view.findViewById(R.id.rgEncryption);
|
||||
|
@ -227,6 +229,7 @@ public class FragmentAccount extends FragmentBase {
|
|||
grpAuthorize.setVisibility(position > 0 ? View.VISIBLE : View.GONE);
|
||||
|
||||
btnAuthorize.setVisibility(provider.type == null ? View.GONE : View.VISIBLE);
|
||||
tvAuthorizeOptional.setVisibility(provider.type == null ? View.GONE : View.VISIBLE);
|
||||
|
||||
btnAdvanced.setVisibility(position > 0 ? View.VISIBLE : View.GONE);
|
||||
if (position == 0)
|
||||
|
@ -438,6 +441,7 @@ public class FragmentAccount extends FragmentBase {
|
|||
btnAutoConfig.setEnabled(false);
|
||||
|
||||
btnAuthorize.setVisibility(View.GONE);
|
||||
tvAuthorizeOptional.setVisibility(View.GONE);
|
||||
rgEncryption.setVisibility(View.GONE);
|
||||
cbInsecure.setVisibility(View.GONE);
|
||||
tilPassword.setPasswordVisibilityToggleEnabled(id < 0);
|
||||
|
|
|
@ -190,6 +190,18 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/etPort" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAuthorizeOptional"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:text="@string/title_optional"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="italic"
|
||||
app:layout_constraintBottom_toBottomOf="@id/btnAuthorize"
|
||||
app:layout_constraintStart_toEndOf="@id/btnAuthorize"
|
||||
app:layout_constraintTop_toTopOf="@id/btnAuthorize" />
|
||||
|
||||
<!-- user -->
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -37,6 +37,18 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/etName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAuthorizeOptional"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:text="@string/title_optional"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="italic"
|
||||
app:layout_constraintBottom_toBottomOf="@id/btnAuthorize"
|
||||
app:layout_constraintStart_toEndOf="@id/btnAuthorize"
|
||||
app:layout_constraintTop_toTopOf="@id/btnAuthorize" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etEmail"
|
||||
android:layout_width="match_parent"
|
||||
|
|
Loading…
Reference in New Issue