1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-29 05:16:51 +01:00

Convert last remaining Switches to MaterialSwitch

Fixes #3454
This commit is contained in:
Arjan Schrijver 2023-12-14 13:23:28 +01:00
parent 9df3ae9c2e
commit 730841e9a1
4 changed files with 9 additions and 9 deletions

View File

@ -24,13 +24,13 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckedTextView;
import android.widget.CompoundButton;
import android.widget.Switch;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.card.MaterialCardView;
import com.google.android.material.materialswitch.MaterialSwitch;
import java.util.ArrayList;
import java.util.List;
@ -128,7 +128,7 @@ public class GBAlarmListAdapter extends RecyclerView.Adapter<GBAlarmListAdapter.
MaterialCardView container;
TextView alarmTime;
Switch isEnabled;
MaterialSwitch isEnabled;
TextView isSmartWakeup;
CheckedTextView alarmDayMonday;

View File

@ -25,13 +25,13 @@ import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.CompoundButton;
import android.widget.Spinner;
import android.widget.Switch;
import android.widget.Toast;
import androidx.annotation.Nullable;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.google.android.material.materialswitch.MaterialSwitch;
import java.io.FileInputStream;
import java.io.IOException;
@ -47,7 +47,7 @@ public class FileManagementActivity extends AbstractGBActivity implements View.O
private final int REQUEST_CODE_PICK_UPLOAD_FILE = 0;
private Spinner fileTypesSpinner;
private Switch encryptedFile;
private MaterialSwitch encryptedFile;
private boolean generateFileHeader = false;
private boolean warningDisplayed = false;
@ -107,7 +107,7 @@ public class FileManagementActivity extends AbstractGBActivity implements View.O
findViewById(R.id.qhybrid_button_download_file).setOnClickListener(this);
findViewById(R.id.qhybrid_button_upload_file).setOnClickListener(this);
((Switch) findViewById(R.id.sqhybrid_switch_generate_file_header)).setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
((MaterialSwitch) findViewById(R.id.sqhybrid_switch_generate_file_header)).setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
generateFileHeader = isChecked;

View File

@ -20,13 +20,13 @@
android:layout_alignParentBottom="true"
android:orientation="vertical">
<Switch
<com.google.android.material.materialswitch.MaterialSwitch
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="encrypted file"
android:id="@+id/qhybrid_switch_encrypted_file" />
<Switch
<com.google.android.material.materialswitch.MaterialSwitch
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="generate file header"

View File

@ -42,13 +42,13 @@
android:text="(Smart)"
android:visibility="invisible" />
<Switch
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/alarm_item_toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
android:layout_margin="8dp" />
android:layout_marginEnd="8dp" />
<LinearLayout
android:id="@+id/dowSelector"