When pressing enter twice on the editText "textbox" the first push will submit the button as usual, but the second press will toggle the switch. How do I ensure that the switch does not get toggled?
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/textbox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textCapCharacters" />
<Switch
android:id="@+id/switch"
android:layout_width="match_parent"
android:layout_height="30dp"
android:checked="false"
android:gravity="left" />
<Button
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="16dp" />
You can Either Set it to not be clickable or to make sure it stays in the same isChecked status, either will work.