0

为什么我switchCompat的检查状态 = true(在 xml 中声明)。但是在java中的Oncreate查看时显示为false?

是否有另一种方法来设置 switchCompat 的状态?

<android.support.v7.widget.SwitchCompat
        android:checked="true"
        android:id="@+id/translationonnoff"
        android:theme="@style/SCBSwitch"       
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />
4

0 回答 0