CopyPastor

Detecting plagiarism made easy.

Score: 0.8574324354248227; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2022-10-07
by amir

Original Post

Original - Posted on 2009-11-02
by Morgan Christiansson



            
Present in both answers; Present only in the new answer; Present only in the old answer;

Adding the tags `android:focusableInTouchMode="true"` and `android:focusable="true"` to the parent layout (e.g. LinearLayout or ConstraintLayout) like in the following example, will fix the problem.
<!-- Dummy item to prevent AutoCompleteTextView from receiving focus --> <LinearLayout android:focusable="true" android:focusableInTouchMode="true" android:layout_width="0px" android:layout_height="0px"/> <!-- :nextFocusUp and :nextFocusLeft have been set to the id of this component to prevent the dummy from receiving focus again --> <AutoCompleteTextView android:id="@+id/autotext" android:layout_width="fill_parent" android:layout_height="wrap_content" android:nextFocusUp="@id/autotext" android:nextFocusLeft="@id/autotext"/>

Adding the tags `android:focusableInTouchMode="true"` and `android:focusable="true"` to the parent layout (e.g. `LinearLayout` or `ConstraintLayout`) like in the following example, will fix the problem. ``` <!-- Dummy item to prevent AutoCompleteTextView from receiving focus --> <LinearLayout android:focusable="true" android:focusableInTouchMode="true" android:layout_width="0px" android:layout_height="0px"/>
<!-- :nextFocusUp and :nextFocusLeft have been set to the id of this component to prevent the dummy from receiving focus again --> <AutoCompleteTextView android:id="@+id/autotext" android:layout_width="fill_parent" android:layout_height="wrap_content" android:nextFocusUp="@id/autotext" android:nextFocusLeft="@id/autotext"/> ```

        
Present in both answers; Present only in the new answer; Present only in the old answer;