mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-04 06:20:26 +00:00
Added support button
This commit is contained in:
parent
48773c5b3f
commit
d3e6494e0b
2 changed files with 47 additions and 1 deletions
|
@ -113,10 +113,12 @@ public class FragmentSetup extends FragmentBase {
|
|||
|
||||
private Button btnApp;
|
||||
private Button btnDelete;
|
||||
private Button btnSupport;
|
||||
|
||||
private Group grpInexactAlarms;
|
||||
private Group grpBackgroundRestricted;
|
||||
private Group grpDataSaver;
|
||||
private Group grpSupport;
|
||||
|
||||
private int textColorPrimary;
|
||||
private int colorWarning;
|
||||
|
@ -182,10 +184,12 @@ public class FragmentSetup extends FragmentBase {
|
|||
|
||||
btnApp = view.findViewById(R.id.btnApp);
|
||||
btnDelete = view.findViewById(R.id.btnDelete);
|
||||
btnSupport = view.findViewById(R.id.btnSupport);
|
||||
|
||||
grpInexactAlarms = view.findViewById(R.id.grpInexactAlarms);
|
||||
grpBackgroundRestricted = view.findViewById(R.id.grpBackgroundRestricted);
|
||||
grpDataSaver = view.findViewById(R.id.grpDataSaver);
|
||||
grpSupport = view.findViewById(R.id.grpSupport);
|
||||
|
||||
// Wire controls
|
||||
|
||||
|
@ -596,6 +600,18 @@ public class FragmentSetup extends FragmentBase {
|
|||
}
|
||||
});
|
||||
|
||||
grpSupport.setVisibility(
|
||||
Helper.hasValidFingerprint(getContext()) || BuildConfig.DEBUG
|
||||
? View.VISIBLE : View.GONE);
|
||||
btnSupport.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent view = new Intent(Intent.ACTION_VIEW)
|
||||
.setData(Helper.getSupportUri(v.getContext()));
|
||||
v.getContext().startActivity(view);
|
||||
}
|
||||
});
|
||||
|
||||
// Initialize
|
||||
FragmentDialogTheme.setBackground(getContext(), view, false);
|
||||
|
||||
|
|
|
@ -920,7 +920,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/title_advanced_more"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -949,6 +949,36 @@
|
|||
android:text="@string/title_delete_account"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnApp" />
|
||||
|
||||
<eu.faircode.email.FixedTextView
|
||||
android:id="@+id/tvSupportHint"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="@string/title_issue"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/btnDelete" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSupport"
|
||||
style="?android:attr/buttonStyleSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:drawableEnd="@drawable/twotone_support_24"
|
||||
android:drawablePadding="6dp"
|
||||
android:text="@string/menu_faq"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvSupportHint" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/grpSupport"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:constraint_referenced_ids="tvSupportHint,btnSupport" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
Loading…
Reference in a new issue