Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1000453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:30:54+00:00 2026-05-16T07:30:54+00:00

I am writing a live wallpaper and I use the function: public void onOffsetsChanged(float

  • 0

I am writing a live wallpaper and I use the function:

public void onOffsetsChanged(float xOffset, float yOffset,
            float xOffsetStep, float yOffsetStep, int xPixelOffset,
            int yPixelOffset)

To see when the uses swipes across to another screen, and I used xPixelOffset to see how far the screen has moved in pixels, however it does not return the number of pixels I would expect.

For each of the 5 screens of the desktop it shows the pixel offset to be 0,-80,-160,-240,-320 however I would expect it to be offset by the width of the screen each time (240px rather than 80px)

Am I missing something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T07:30:54+00:00Added an answer on May 16, 2026 at 7:30 am

    You’ll notice that when you scroll, the foreground of the home screen (icons, widgets, etc.) moves to the left or right by the full screen width, but the background image (or live wallpaper) only moves by a fraction of that width. The obvious result is a parallax-scrolling effect.

    To put it another way, end-to-end your 5 screens total something like 1200px (5 x screen width), but the maximum width of a wallpaper on the same display is something like 480px (2 x screen width), because the back doesn’t scroll as much as the front.

    The offsets, then, should not be used as a measure of how far the display’s foreground has moved, but how far the background has moved.

    So you’re still getting the information that you need from the offsets parameter. It’s just that your interpretation of that information has to change a bit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a live wallpaper which utilizes a number of paths. I scale
I'm currently writing a live wallpaper for Android and it has a PreferenceScreen which
I just started writing a live wallpaper. What I would like to do is
I am writing a 3d live wallpaper for android using the famous GLSurfaceView wrapper
I am writing a live wallpaper for Android. The wallpaper includes a bit of
I'm writing the code for my own live wallpaper. The wallpaper (among other things)
I am writing an iOS app that uses live audio analysis. It has an
I am writing an Ajax application which uses a callback function to add a
I'm writing a Google App Engine database that once it goes live will probably
I'm writing an application which fetches data from a live engine and works on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.