Migrate to CompoundButton

Switch and SwitchCompat are both CompoundButton.

Using CompoundButton in Java will helps migration in the future.

Bug: 306658427
Test: manual - on affected pages
Change-Id: I7cdc2601879a85d33f77239e38263320d5a6984e
This commit is contained in:
Chaohui Wang
2023-10-25 14:57:16 +08:00
parent 12ea5afdf1
commit c4a3a50d58
9 changed files with 24 additions and 36 deletions

View File

@@ -52,13 +52,13 @@ import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.BaseExpandableListAdapter;
import android.widget.CompoundButton;
import android.widget.ExpandableListView;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.Switch;
import android.widget.TextView;
import androidx.annotation.NonNull;
@@ -456,10 +456,10 @@ public class TrustedCredentialsFragment extends ObservableFragment
return "Group" + getUserIdByGroup(groupPosition);
}
private class ViewHolder {
private static class ViewHolder {
private TextView mSubjectPrimaryView;
private TextView mSubjectSecondaryView;
private Switch mSwitch;
private CompoundButton mSwitch;
}
}