1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-28 02:37:16 +00:00

Changed doze buttons into links

This commit is contained in:
M66B 2019-12-10 16:43:43 +01:00
parent 1b4f0fc5f1
commit ba473504be
2 changed files with 27 additions and 27 deletions

View file

@ -27,6 +27,7 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.net.ConnectivityManager;
import android.net.Uri;
@ -77,8 +78,8 @@ public class FragmentSetup extends FragmentBase {
private TextView tvDozeDone;
private Button btnDoze;
private Button btnBattery;
private Button btnStopped;
private TextView tvBatteryUsage;
private TextView tvSyncStopped;
private Button btnDataSaver;
@ -123,8 +124,8 @@ public class FragmentSetup extends FragmentBase {
tvDozeDone = view.findViewById(R.id.tvDozeDone);
btnDoze = view.findViewById(R.id.btnDoze);
btnBattery = view.findViewById(R.id.btnBattery);
btnStopped = view.findViewById(R.id.btnStopped);
tvBatteryUsage = view.findViewById(R.id.tvBatteryUsage);
tvSyncStopped = view.findViewById(R.id.tvSyncStopped);
btnDataSaver = view.findViewById(R.id.btnDataSaver);
@ -232,14 +233,16 @@ public class FragmentSetup extends FragmentBase {
}
});
btnBattery.setOnClickListener(new View.OnClickListener() {
tvBatteryUsage.setPaintFlags(tvBatteryUsage.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
tvBatteryUsage.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Helper.viewFAQ(getContext(), 39);
}
});
btnStopped.setOnClickListener(new View.OnClickListener() {
tvSyncStopped.setPaintFlags(tvSyncStopped.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
tvSyncStopped.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Helper.viewFAQ(getContext(), 16);

View file

@ -110,7 +110,7 @@
android:id="@+id/tvQuickRemark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_marginTop="12dp"
android:text="@string/title_setup_wizard_remark"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintEnd_toEndOf="parent"
@ -459,30 +459,28 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/tvDozeDone" />
<Button
android:id="@+id/btnBattery"
style="?android:attr/buttonStyleSmall"
<TextView
android:id="@+id/tvBatteryUsage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:minWidth="0dp"
android:minHeight="0dp"
android:text="@string/title_setup_doze_battery"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnDoze" />
<Button
android:id="@+id/btnStopped"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:minWidth="0dp"
android:minHeight="0dp"
android:text="@string/title_setup_doze_stopped"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorLink"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnDoze" />
<TextView
android:id="@+id/tvSyncStopped"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_setup_doze_stopped"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorLink"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvBatteryUsage" />
<TextView
android:id="@+id/tvDataSaver"
android:layout_width="wrap_content"
@ -491,9 +489,8 @@
android:text="@string/title_setup_data"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?attr/colorWarning"
android:textIsSelectable="true"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnBattery" />
app:layout_constraintTop_toBottomOf="@id/tvSyncStopped" />
<Button
android:id="@+id/btnDataSaver"
@ -503,7 +500,7 @@
android:minWidth="0dp"
android:minHeight="0dp"
android:text="@string/title_setup_manage"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvDataSaver" />
<!-- inbox -->