Changed doze buttons into links

pull/169/head
M66B 5 years ago
parent 1b4f0fc5f1
commit ba473504be

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

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

Loading…
Cancel
Save