How do I avoid focusing on EditText when the activity is executed?

Asked 1 years ago, Updated 1 years ago, 64 views

There are two elements in the activity, EditText and ListView. When the activity is turned on, a cursor is created in EditText

    EditText.setSelected(false);

I did it like this, but it's still like that. What do you want me to do?

android android-listview android-edittext

2022-09-22 10:37

1 Answers

<LinearLayout
        android:focusable="true"
        android:focusableInTouchMode="true"
        android:layout_width="0px"
        android:layout_height="0px"/>

If you add this sentence in the layout XML, it will be solved


2022-09-22 10:37

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.