Aşağıdaki şekilde yaptım hocam ama çalıştıramadım
[code]
AnimationDrawable animation = new AnimationDrawable();
animation.addFrame(getResources().getDrawable(R.drawable.tmp1), 60);
animation.addFrame(getResources().getDrawable(R.drawable.tmp2), 60);
animation.addFrame(getResources().getDrawable(R.drawable.tmp3), 60);
animation.addFrame(getResources().getDrawable(R.drawable.tmp4), 60);
animation.setOneShot(false);
ImageView imageAnim = (ImageView) view.findViewById(R.id.simple);
new DownloadImageTask((ImageView) view.findViewById(R.id.simple)).execute("RESİM URLSİ");
imageAnim.setImageDrawable(animation);
animation.start();
[/code]
Sorunsuz çalışan animasyon kodum
[code]
public Resim extends Fragment {
private ImageView mImaView;
private AnimationDrawable animation;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.caps, container, false);
if (container == null) {
return null;
}
animation = new AnimationDrawable();
animation.addFrame(getResources().getDrawable(R.drawable.tmp0), 100);
animation.addFrame(getResources().getDrawable(R.drawable.tmp1), 100);
animation.addFrame(getResources().getDrawable(R.drawable.tmp2), 100);
animation.addFrame(getResources().getDrawable(R.drawable.tmp3), 100);
animation.addFrame(getResources().getDrawable(R.drawable.tmp4), 100);
animation.addFrame(getResources().getDrawable(R.drawable.tmp5), 100);
animation.addFrame(getResources().getDrawable(R.drawable.tmp6), 100);
animation.addFrame(getResources().getDrawable(R.drawable.tmp7), 100);
animation.addFrame(getResources().getDrawable(R.drawable.tmp8), 100);
animation.addFrame(getResources().getDrawable(R.drawable.tmp9), 100);
animation.setOneShot(false);
ImageView imageView = (ImageView)view.findViewById(R.id.simple);
imageView.setBackgroundDrawable(animation);
imageView.post(new Starter());
}
class Starter implements Runnable {
public void run() {
animation.start();
}
}
[/code]
new DownloadImageTask((ImageView) view.findViewById(R.id.simple)).execute("RESİM URLSİ");
bunu nasıl entegre edeceğim hakkınızı helal edin vaktinizi alıyorum :)