public void onEvent(ThemeSelectedEvent evt) { mSelectedTheme = evt.theme; mScreenController.openScreen(ScreenController.Screen.DIFFICULTY); Bitmap bitmap = GameUtility.ScaleDown(Resource.Drawable.background, GameUtility.ScreenWidth(), GameUtility.ScreenHeight()); Bitmap backgroundImage = GameThemes.getBackgroundImage(mSelectedTheme); backgroundImage = GameUtility.Crop(backgroundImage, GameUtility.ScreenHeight(), GameUtility.ScreenWidth()); Drawable[] backgrounds = new Drawable[2]; backgrounds[0] = new BitmapDrawable(Application.Context.Resources, bitmap); backgrounds[1] = new BitmapDrawable(Application.Context.Resources, backgroundImage); TransitionDrawable crossfader = new TransitionDrawable(backgrounds); mBackgroundImage.SetImageDrawable(crossfader); crossfader.StartTransition(2000); }
public virtual void onEvent(ThemeSelectedEvent evt) { }