2010-10-18 107 views
0

我想要重建(也许我甚至不必)nativ android progress indicator并将其显示为列表项的图标。我跟着this example,并与一个沉重的表演吃动画,这也与本地微调不匹配。该代码具有“LinearInterpolator”,似乎会导致这些问题。在Android中使用本机微调器

现在我做我自己的极间和满足我的需要之一:它量化步入12

不过,我仍然有巨大的性能问题。 UiThread现在不允许我的后台线程运行,它们旨在下载和解析数据。请注意,我在列表中显示了几个spinners。我也尝试在我的listAdapter中将插入器设置为类变量。所以,所有的listViews都可以使用这个Interpolator。

if(imageViewIcon != null) { 
    RotateAnimation anim = new RotateAnimation(0f, 360f, 51f, 51f); 
    anim.setInterpolator(new Interpolator() { 

    @Override 
    public float getInterpolation(float input) { 
     return (float) Math.floor((double)input*10)/12; 
    } 
    }); 
// anim 
    anim.setRepeatCount(Animation.INFINITE); 
    anim.setDuration(1000); 


    // Start animating the image 
    imageViewSpinner.startAnimation(anim); 


} 

更新

最后我发现它确实为我做同样的ProgressBarWidget。但是,它仍然不是很高效。 (尽管如此)

回答