我遇到了问题: 我的应用程序中的AnimationDrawable在我的Nexus 4(Android 4.4.2)上完美运行,但在我的三星Galaxy S3(4.1.2)mini上它并没有启动。有谁知道如何解决这个问题?
问候Nils
我的Java代码:
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final AnimationDrawable ad = (AnimationDrawable) getResources().getDrawable(R.drawable.ad);
ad.run();
}
AnimationDrawable xml-file:
<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@drawable/image_1" android:duration="150" />
<item android:drawable="@drawable/image_2" android:duration="150" />
<item android:drawable="@drawable/image_3" android:duration="150" />
<item android:drawable="@drawable/image_4" android:duration="500" />
</animation-list>