Majid
Majid

Reputation: 230

add animation to listview items

I am populating a list view with simplecursoradapter Is there any way to add animation to items?I want something like android sound picker app which when starts items appearers one by one ..Here is my adapter

    Cursor c = db.rawQuery(mySQL, null);

SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout.list_item, c, 
            columns, new int[] {R.id.list_item_text_sub,R.id.list_item_text_main,R.id.list_item_text_id,R.id.list_item_img}, 0);

adapter.setViewBinder(new CustomViewBinder());
ListView list = (ListView) findViewById(R.id.list_poet_name);
list.setAdapter(adapter);

Upvotes: 2

Views: 12716

Answers (2)

SAndroidD
SAndroidD

Reputation: 1755

Refer this Lib It Work Library Link

Example

Animation Example

Use This in your xml file

<com.twotoasters.jazzylistview.JazzyListView
    android:id="@id/android:list"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:divider="@null"
    app:effect="fan"
    app:only_animate_new_items="false"
    app:only_animate_fling="false"
    app:max_velocity="0" />

Only you can change the property of "JazzyListView"
i.e

app:effect="Card" r "Curl" OR "Fade" OR "flip" OR "fly" OR "Grow" OR "Wave" OR "tilt" 

etc.

Upvotes: 2

Related Questions