I am applying Animation Drawable with some smoke like animation. It works properly everywhere except at the corners/edges of the screen. Android automatically shrinks the Imageview of Animation Drawable at the corners and the animation does not happen at the proper position because of the shrink ? I want my animation Drawable to go out of the screen bound but it should show the proper animation at the corners.
What I am doing is
mAnimation = new ImageView(this);
mAnimation.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));
mAnimation.setVisibility(View.VISIBLE);
mlp.setMargins(click_X, click_Y, 0, 0);
mAnimation.setLayoutParams(mlp);
mAnimation.setBackgroundDrawable(this.getResources().getDrawable(R.drawable.smoke));
AnimationDrawable anim = (AnimationDrawable) mAnimation.getBackground();
if (anim != null) {
anim.start();
}
now this imageview Animation gets shrink if we click at the edges of the screen ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…