Hi All
I am new to developing live wallpaper i want to move background sky continuously for that i have use below code but it is work smoothly in 2.3device but below and above 2.3 devise it getting jerks please help me to solve this problem.
private int mBGFarMoveX = 0;
private int mBGNearMoveX = 0;
mBGFarMoveX = mBGFarMoveX - 2;
// decrement the near background
mBGNearMoveX = mBGNearMoveX - 4;
if (newFarX <= 0) {
mBGFarMoveX = 0;
canvas.drawBitmap(backGround, mBGFarMoveX, 0, null);
canvas.drawBitmap(bmp, 20,20,null);
}
else {
// need to draw original and wrap
canvas.drawBitmap(backGround, mBGFarMoveX, 0, null);
canvas.drawBitmap(backGround, newFarX, 0, null);
canvas.drawBitmap(bmp, 20, 20,null);
}
and i have use invalidate method in ondraw(canvas);