Strange error in my ListView (Android)

I have a simple Navigation Box that includes EditTextand ListView.

It looks like this:

http://s7.postimg.org/7uzzvf723/SSS_default.png

Everything works fine, but I found out that when I quickly scroll down the list at the beginning of the application (when I already opened the navigation box), it sometimes shows me this:

http://s11.postimg.org/pmlktkmer/SSS.png

I really don’t know what causes this problem, and of course I don’t know how to fix it. Is it possible that this problem is causing android:animateLayoutChanges="true"in my xml file?

Any tips for me?

Thank!

+4
source share
1 answer

After 40 minutes of hard work, I came to my decision. I don’t know why, but it may not be very good to use android predefined animations. Probably no mistakes, I hope ...

My xml file:

<LinearLayout
    android:id="@+id/left_drawer"
    android:layout_width="250dp"
    android:layout_height="wrap_content"
    android:layout_gravity="start"
    android:background="#F09609"
    android:focusable="true"
    android:focusableInTouchMode="true"
    android:orientation="vertical"
    android:animateLayoutChanges="true" >  <!-- I meant this. -->

    <EditText
        android:id="@+id/search"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="@string/search_action_hint"
        android:inputType="textCapWords" 
        android:textColorHint="#FFFFFF"
        />

    <ListView
        android:id="@+id/left_drawer_list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#ffff"
        android:choiceMode="singleChoice"
        android:divider="@android:color/transparent"
        android:dividerHeight="0dp"
        android:listSelector="@android:color/transparent" 
        android:animateLayoutChanges="true" /> <!-- When I deleted this one, no bugs. -->

</LinearLayout>

Many thanks to @KalelWade who came up with this solution!

Thank!

0
source

All Articles