Avoid a wallpaper to stretch across 5 screens - android

I've been facing a problem. How do I set a wallpaper in Android, without stretching it across 5 home screens. To be clear, I have a resource images with resolution 320x480px and when I set it as wallpaper in Android, it gets stretched across 5 screens, but I want it to show up only in 1 screen (or the same image in all screens), got it?
I'm not interested in using a livewallpaper.

Only way to have an app do that is using a live wallpaper.
There are two types of wallpaper, static and live. The scrolling of a static background is controlled by the launcher app. This is why LauncherPro and ADW can control the scrolling. When the user chooses a live wallpaper, the launcher simply displays whatever the LWP wants to render, so the LWP controls the scrolling, if any. This is how MultiPicture LWP solves the problem.
So your only options are to implement a custom launcher (which I doubt you want to do for such minor functionality) or implement a live wallpaper.
And BTW, setWallpaperOffsetSteps is an internal method called by the launcher on a live wallpaper, so the LWP knows where it's supposed to be drawing. You can't call it directly, but you can listen to onOffsetsChanged within your LWP to facilitate your own scrolling implementation.

Tap and hold your screen when you get popup "add to home screen"
select "wallpapers"
select "home screen wallpaper"
when you've selected a picture from gallery or explorer you get a screen where you can crop your Image to fit home screen.
On the bottom you can select 2 type of crops.
A big crop for setting it accros 5 screens and a small crop to use the same BG on all 5 screens.
see screenshot:
select the latter, crop your picture and save.

Not possible. May be there are any private libraries for it.

Apparently it's not native Android functionality. You can, however, get apps that do it. "Launcher Pro" and "ADW EX Launcher" can both disable scrolling but you may need to create a landscape rectangular image with empty borders at the right size.
Alternatively, the app "MultiPicture Live Wallpaper" may do what you need. A reviewer wrote: "Lets me use a picture sized the same as my phone's screen as the background on all pages of the launcher. Not sure why that isn't part of Android."
EDIT: have a look at tdtje's post before you try these. If that works, then awesome. I'm not sure which version of Android that became available in, as I'm using 2.1 without that feature.
FURTHER EDIT: In the comments below, Martyn gives us a first hand opinion!

I went to Settings and clicked on home screen. Then went to wallpaper. I selected my picture and cropped using the gallary app. This had a setting on the top to either stretch or not. I'm running Android 4.4.

Related

Flutter: Avoid wallpaper streching across multiple screens

I'm using a Wallpaper Manager for setting an image as Home screen. It works fine for Lock Screen, but not for Home screen. This image that I want to set as Home screen is as wide and long as the screen, so it gets blurred when stretched across multiple screens. I'd like for this image to be repeated on each screen, not stretched across all. Is there any solution? I'm open to any idea, even if it doesn't include wallpaper manager.
I get it too, bro. But this package have a function called setWallpaperFromFileWithCrop
so you can let user crop image to set wallpaper as you want.

Image as Background for UI

I am newbi in android world and working on an android app.
I have used many of buttons and image buttons in my app.
Now i want to replace them with an background image. (So i can make nice gui easily)
I know i can use view listener and i can find the clicked x and y coordinate from onclick method.
But I want to how can i find which part of the image was clicked. Because different phones have different resolutions how can i do this efficiently ?
And one more thing, Is it good to handle gui this way ?
Thanks !
You first need to set the initial window width and height before execution of other code and load an image of quality based on the screen size. so for example you can have 3 sets of images of different size. One for 5 inch screens and below. Another for 7 inch tablets. Another for 10 and possibly another super high quality image for anything above. As many devices coming on in the near future are reaching resolutions much higher then previously developed for. Just run code initially that detects the initial window size at hand and load image based on resolution of that device. From their program as you plan to.
Also to jump on answer above. Detect rotation event and adjust image accordingly. and update accordingly. You are adding more programming of course but no reason what you are asking could not be done. Just a few extra events detection and you should be good to go to accomplish exactly what you are looking to do
AFAIK it is not good practice to handle the GUI this way. Mostly because android screen size is not standard and so you can never be sure that it will work perfectly in all the devices. You can ofcourse handle the events using onTouchListener and see which part of image was clicked from the coordinates in the MotionEvent Object. But, I would not recommend doing so.
Creating layouts of different screen sizes and handling the events using Buttons and ImageButtons will be good.
you can use android:background attribute for background images in the layout xml files...
however you also can set the background of UI element programatically

get size and positions of icons and bottom strip / home button in live wallpaper

Is it possible to get the sizes and positions of everything (or at least anything) that "obstructs" the view to live wallpaper?
I would like to make a wallpaper that would make special effects around icons or at least bottom strip.
Also, is the size of the bottom strip (the one with home button) in any way standard so I could guess its size?
No.
At least, not unless whatever launcher the user is using offers a special API to do so. But even so you cannot guarantee that the user will be using that launcher as this is Android and that component can be replaced by a third-party launcher (e.g., LauncherPro, Go Launcher EX, etc.)
The only real way to do this would be to give the user the option in the settings of your live wallpaper to change where it does and does not display things.

Programmatically make wallpaper fit each screen and not scroll

I want to programmatically set a wallpaper to be an exact fit of the current screen.
Android fits the image to scroll as you change windows by defalt and so you never see the whole image on any one screen.
Applications like Wallpaper Wizardrii perform the function of setting the image to a single screen for the user, but I have never seen an answer on any forum that suggests how this is done.
Can any Android guru out there help - this problem has been doing my head in for nearly a week now!
You need to write a Live Wallpaper so you can render your image to the screen exactly how you want. If you just set a static image, the launcher app (or anything else showing the wallpaper) will be free to adjust it and resize and scroll. By writing a live wallpaper, you get to receive the requests from launcher about what it wants to happen to the wallpaper, and follow or ignore them as you want.
Also conceptually "make the wallpaper an exact fit for the current screen" is not even possible, because there is only one wallpaper, but two orientations (landscape and portrait) it can be shown in. That one wallpaper just fundamentally can't exactly fit both orientations.

Image Count Indicator in Android

I am displaying an image gallery consisting of 15 images with image displayed on the screen (full-screen) at a time. When the user swipes across, the image changes. I am looking at a small polka-dots style indicator at the center-bottom of the screen to show the image count and where the user currently is.
eg: If my gallery held 5 images and the user was currently on the 3rd image, then there would be 5 polka dots with 3rd dot highlighted/filled with color and the rest polka-dots be hollow.
I know the description might sound a little vague but in short, I am looking at an image count indicator! :)
Thanks!
You might check out this Android Count Indicator project: https://github.com/rupertbates/android-count-indicator
I know exactly what you want, you are looking for the PageControl that is used on iPhones with the Scroll Views. I have never seen anything like that for Android. You would have to build a custom view. It's explained here:
Building Custom Android Components
I finally found it in the Launcher code!

Categories

Resources