I am trying to add Animation for ListView I am using getView()to draw some 
views in list. all works fine.

    public View getView(int position, View convertView, ViewGroup parent) { 
}

I am trying to add animation when user click on list cell then all list 
cells should slide left and new data should come from right at same time, 
means cell data is moving towards left and same time new data coming from 
right side. 

I Have implemented following code in OnItemClickListener

    @Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long 
arg3) {
    Animation slideOutAnimation=AnimationUtils.loadAnimation(this, 
R.anim.slide_out);
    slideOutAnimation.setDuration(900);
    
        Animation slideInAnimation=AnimationUtils.loadAnimation(this, 
R.anim.slide_in);
    slideInAnimation.setDuration(500);
        
        listView.startAnimation(slideOutAnimation);

    new Handler().postDelayed(new Runnable() {
        @Override
public void run() {
    data = newData();
    listView.startAnimation(slideInAnimation);
    myAdapterClass.notifyDataSetChanged();
}
    }, slideOutAnimation.getDuration());
}
    };

above code is working but not getting desire output I am getting one empty 
view while changing Animation.

Left Sliding Animation Starts--- Empty View----Right Sliding Animation 
Starts  

Not getting why Empty view (shows empty screen for while) is coming, I have 
played with Animation time and handler but no luck. 

How to remove that empty view ? how to achieve this output ?

Left Sliding Animation Starts(Data moving)( Same time data coming from 
Right) Right Sliding Animation Starts  

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to