minafaw / android-query

Automatically exported from code.google.com/p/android-query
0 stars 0 forks source link

Add transition animation. #119

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Add ability to start transition animation, it looks much better then default 
FADE_IN.
Right now I have to specify it manually:
new BitmapAjaxCallback() {
    @Override
    protected void callback(String url, ImageView iv, Bitmap bm, AjaxStatus status) {
        if (status.getSource() == AjaxStatus.NETWORK && bm != null) {
            TransitionDrawable drawable = new TransitionDrawable(new Drawable[]{..});
            iv.setImageDrawable(drawable);
            drawable.startTransition(500);
            return;
        }
        super.callback(url, iv, bm, status);
    }
}

Original issue reported on code.google.com by romka...@gmail.com on 28 Jan 2013 at 11:26