I made the code I made the app design, but when I added the switch on the app design it kept on showing me the "Replace usage of 'Switch' widget." I'm not sure with problem it is my first time with Android Studio
<Switch
android:id="@+id/sw_compact"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="24dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:text="@string/activecustomer"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.502"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextNumber" />
this my problem
Nothing to be worried. It is just a warning because you are using AppCompatActivity. It supports material design and animations. We can say that is classy than classical 'Switch'. It is safe to migrate to 'SwitchCompat' as that contains more features.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.