I get this error on my debugger when i try to edit the value manually: Generated value (int) is not compatible with the declared type (android.view.View)
final View l = findViewById(R.id.GameplayLayout);
Animation a = AnimationUtils.loadAnimation(MainActivity.this,
android.R.anim.fade_out);
a.setAnimationListener(new AnimationListener() {
public void onAnimationEnd(Animation animation) {
fadein();
}
public void onAnimationRepeat(Animation animation) {
}
public void onAnimationStart(Animation animation) {
}
});
l.startAnimation(a);
It selects:
l.startAnimation(a);
as error line, in the debugger it says:
l = null;
Why is it doing this to me? 🙁
Thank you!
I had to use R.id.startscreen… Fail… Sorry!
Try calling
setContentView(R.layout.GameplayLayout)before finding views.