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

  • SEARCH
  • Home
  • 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 6759235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:54:42+00:00 2026-05-26T13:54:42+00:00

I did an app that sets the wallpaper using several png images on timed

  • 0

I did an app that sets the wallpaper using several png images on timed intervals. The wallpaper size that is displayed on the screen is not correct an all devices. On a 9.7″ tablet, the size is perfect which includes enough room to scroll it left and right. On a phone however, only a small portion of each image can be seen. It looks like it’s zoomed in.

What coding do I need to tell Android to display the images in the correct size on all devices?

I was assuming the WallpaperManager did this but it seems I don’t know how to use it yet.

Here is how I’m changing the wallpaper:

myWallpaperManager.setResource(R.drawable.muzdalifah);

Edit showing all code used for changing the wallpapers:

public class AlarmReceiverChangeImage extends BroadcastReceiver {

@Override
public void onReceive(Context context, Intent intent) {

    /*
     * Make the settings available from the settings xml file.
     */
    SharedPreferences mySettings = PreferenceManager
            .getDefaultSharedPreferences(context);

    /*
     * Allow editing.
     */
    SharedPreferences.Editor editor = mySettings.edit();

    /*
     * Get the settings into variables.
     */
    boolean bln_checkbox_changing_is_activated = mySettings.getBoolean(
            "checkbox_changing_is_activated", false);

    String myCurrentImageName = mySettings.getString("current_image",
            "kabanight1");

    WallpaperManager myWallpaperManager = WallpaperManager
            .getInstance(context.getApplicationContext());

    if (bln_checkbox_changing_is_activated == true) {

        if (myCurrentImageName.equals("tentcity")) {

            try {

                myWallpaperManager.setResource(R.drawable.kabacloseup);
                myCurrentImageName = "kabacloseup";

            } catch (IOException e) {
                e.printStackTrace();
            }

        } else if (myCurrentImageName.equals("kabacloseup")) {
            try {

                myWallpaperManager.setResource(R.drawable.kabanight1);
                myCurrentImageName = "kabanight1";

            } catch (IOException e) {
                e.printStackTrace();
            }

        } else if (myCurrentImageName.equals("kabanight1")) {
            try {

                myWallpaperManager.setResource(R.drawable.madina1);
                myCurrentImageName = "madina1";

            } catch (IOException e) {
                e.printStackTrace();
            }

        } else if (myCurrentImageName.equals("madina1")) {
            try {

                myWallpaperManager.setResource(R.drawable.madina2);
                myCurrentImageName = "madina2";

            } catch (IOException e) {
                e.printStackTrace();
            }

        } else if (myCurrentImageName.equals("madina2")) {
            try {

                myWallpaperManager.setResource(R.drawable.kabaday1);
                myCurrentImageName = "kabaday1";

            } catch (IOException e) {
                e.printStackTrace();
            }

        } else if (myCurrentImageName.equals("kabaday1")) {
            try {

                myWallpaperManager.setResource(R.drawable.uhud1);
                myCurrentImageName = "uhud1";

            } catch (IOException e) {
                e.printStackTrace();
            }

        } else if (myCurrentImageName.equals("uhud1")) {
            try {

                myWallpaperManager.setResource(R.drawable.bus);
                myCurrentImageName = "bus";

            } catch (IOException e) {
                e.printStackTrace();
            }

        } else if (myCurrentImageName.equals("bus")) {
            try {

                myWallpaperManager.setResource(R.drawable.muzdalifah);
                myCurrentImageName = "muzdalifah";

            } catch (IOException e) {
                e.printStackTrace();
            }

        } else if (myCurrentImageName.equals("muzdalifah")) {
            try {

                myWallpaperManager.setResource(R.drawable.tentcity);
                myCurrentImageName = "tentcity";

            } catch (IOException e) {
                e.printStackTrace();
            }

        } else {

            try {
                myWallpaperManager.setResource(R.drawable.madina1);
                myCurrentImageName = "madina1";

            } catch (IOException e) {
                e.printStackTrace();
            }
        } // End if myCurrentImageName.equals("kabaday1").
    } // End if bln_checkbox_changing_is_activated == true.

    editor.putString("current_image", myCurrentImageName); // value to store
    editor.commit();
} // End method onReceive.
  • 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-26T13:54:43+00:00Added an answer on May 26, 2026 at 1:54 pm

    The rendering of your image depends on following:

    Screen size

    Screen density

    Resolution

    You should better read the below document completely to understand how you handle this situation:
    Supporting Multiple Screens

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

Sidebar

Related Questions

If I have a lithium app that I did not set up how do
...using wwf4, VS2010 a co-worker built an app that host WWF4, he did a
I believe that I did everything necessary to change my app for ipad (was
I am using push notifications module. One of my friend did an app for
My app was working and I did not change a single thing in the
I recently inherited an iPhone app. The original developer did not understand memory management
I'm doing an app that will have to connect to several hosts. Originally I
I have an app that functions properly and does not force close or crash.
I have an app that I have been working on and I did a
I have a rails blog app that was working well.. However, I did some

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.