mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-21 05:37:07 +00:00
Added reset open help
This commit is contained in:
parent
2c80d5cc9b
commit
b3dce2295a
3 changed files with 31 additions and 0 deletions
|
@ -27,6 +27,7 @@ import android.content.Context;
|
|||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Typeface;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
|
@ -68,6 +69,8 @@ import java.util.regex.Matcher;
|
|||
import java.util.regex.Pattern;
|
||||
|
||||
public class FragmentDialogOpenLink extends FragmentDialogBase {
|
||||
private static final String URI_RESET_OPEN = "https://support.google.com/pixelphone/answer/6271667";
|
||||
|
||||
// https://github.com/newhouse/url-tracking-stripper
|
||||
private static final List<String> PARANOID_QUERY = Collections.unmodifiableList(Arrays.asList(
|
||||
// https://en.wikipedia.org/wiki/UTM_parameters
|
||||
|
@ -109,6 +112,7 @@ public class FragmentDialogOpenLink extends FragmentDialogBase {
|
|||
private TextView tvOwner;
|
||||
private Group grpOwner;
|
||||
private Button btnSettings;
|
||||
private TextView tvReset;
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
|
@ -168,6 +172,7 @@ public class FragmentDialogOpenLink extends FragmentDialogBase {
|
|||
tvOwner = dview.findViewById(R.id.tvOwner);
|
||||
grpOwner = dview.findViewById(R.id.grpOwner);
|
||||
btnSettings = dview.findViewById(R.id.btnSettings);
|
||||
tvReset = dview.findViewById(R.id.tvReset);
|
||||
|
||||
final Group grpDifferent = dview.findViewById(R.id.grpDifferent);
|
||||
|
||||
|
@ -363,6 +368,14 @@ public class FragmentDialogOpenLink extends FragmentDialogBase {
|
|||
}
|
||||
});
|
||||
|
||||
tvReset.setPaintFlags(tvReset.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
|
||||
tvReset.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Helper.view(view.getContext(), Uri.parse(URI_RESET_OPEN), true);
|
||||
}
|
||||
});
|
||||
|
||||
// Initialize
|
||||
|
||||
tvTitle.setText(title);
|
||||
|
@ -447,6 +460,7 @@ public class FragmentDialogOpenLink extends FragmentDialogBase {
|
|||
tvOwnerRemark.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||
grpOwner.setVisibility(View.GONE);
|
||||
btnSettings.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||
tvReset.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
private static Uri sanitize(Uri uri) {
|
||||
|
|
|
@ -285,6 +285,22 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvOwner" />
|
||||
|
||||
<eu.faircode.email.FixedTextView
|
||||
android:id="@+id/tvReset"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:drawableEnd="@drawable/twotone_open_in_new_12"
|
||||
android:drawablePadding="6dp"
|
||||
android:drawableTint="?android:textColorLink"
|
||||
android:focusable="false"
|
||||
android:text="@string/title_reset_open"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textColor="?android:textColorLink"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnSettings" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/grpDifferent"
|
||||
android:layout_width="0dp"
|
||||
|
|
|
@ -1546,6 +1546,7 @@
|
|||
<string name="title_check_owner">Check owner</string>
|
||||
<string name="title_remark_owner">Information will be retrieved from <a href="https://ipinfo.io/">ipinfo.io</a></string>
|
||||
<string name="title_ip_owner">Owner IP address</string>
|
||||
<string name="title_reset_open">Set or clear default apps</string>
|
||||
<string name="title_select_app">Select app</string>
|
||||
<string name="title_updated">There is an update to version %1$s available</string>
|
||||
<string name="title_issue">Do you have a question or problem?</string>
|
||||
|
|
Loading…
Reference in a new issue