I need the picture on the background of the screen to move due to frame animation. Compiles, but gives an error ..

main.xml

<LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android" android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: id = "@+id/ll" android: orientation = "vertical" android: gravity = "center"> </LinearLayout> 

MainActivity.java

 public class MainActivity extends Activity { Animation mEnlargeAnimation; Animation mShrinkAnimation; Animation mPlayUp; MediaPlayer mp; LinearLayout ll; TextView tv; Button play; Button settings; Button about; Button exit; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); setContentView(R.layout.main); mp = MediaPlayer.create(MenuActivity.this, R.raw.music); mp.start(); mp.setLooping(true); tv = (TextView) findViewById(R.id.tv); play = (Button) findViewById(R.id.play); settings = (Button) findViewById(R.id.settings); about = (Button) findViewById(R.id.about); exit = (Button) findViewById(R.id.exit); ll = (LinearLayout) findViewById(R.id.ll); Animation bg_rotate = AnimationUtils.loadAnimation(this, R.anim.bg_wow); ll.startAnimation(bg_rotate); } } 

My animation file in res / anim / bg_wow.xml

 <animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="false"> <item android:drawable="@drawable/bg_menu" android:duration="200"/> <item android:drawable="@drawable/menu_bg" android:duration="200"/> </animation-list> 
  • Translate, pzh, to a Russian question. - Yuriy SPb
  • And add exactly what caused you difficulty. What exactly is the problem. - Yuriy SPb
  • Help YuriSpb ... I can't do anything anymore ... - Flippy
  • Without specifying what the error and on which line - you can not help. - YurySPb

0