Can't scroll Background

192 views Asked by At

Can anyone tell me how to make background of live wallpaper scroll? Default launcher in phone doesn't scroll since Android 4.1 update. However, certain third party launchers do scroll the background. Regarding my live wallpaper; I have added onOffsetchanged, yet the background doesn't scroll. Can anyone help me?

Here is the code

final AutoParallaxBackground background = new AutoParallaxBackground(0, 0, 0, 5);
background.attachParallaxEntity(new ParallaxEntity(0f, new Sprite(0, 0, backgroundRegion, this.getVertexBufferObjectManager())));
    mScene.setBackground(background);
2

There are 2 answers

0
Rama On

check by adding with the following line

auto_background.setParallaxChangePerSecond(5.0f);
1
playmaker420 On
new ParallaxEntity(5f or -5f, new Sprite(0, 0, backgroundRegion, this.getVertexBufferObjectManager()));

The first parameter of ParallaxEntity must be greater than 0 to move right ,negatvie values to move left