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.
Related
I am working on an App that captures the phone camera feed and display it into a GLSurfaceView and then in the renderer I add ImageViews to the screen in some specific coordinates.
The problem I am facing is that the camera feed in the GLSurfaceView is never full screen. In some Android versions it will put some black space horizontally in the top and bottom and in some other versions the black space will be smaller but vertical on the Left and Right of the screen.
I wanted to ask if there is any way to force fullscreen on every version ? I am fairly new to working with GLSurfaceView and nothing I tried works.
You could look into immersive mode to get rid of the system buttons if that's appropriate to your app: https://developer.android.com/training/system-ui/immersive
You should also look into the android.max_aspect manifest setting to eliminate black bars on very widescreen devices: https://android-developers.googleblog.com/2017/03/update-your-app-to-take-advantage-of.html
You should also look into supporting display cutouts (notches): https://developer.android.com/guide/topics/display-cutout/
As mentioned in the comments by BDL, if the screen and camera aspect ratio don't match, then you are going to have to have black bars, or cut off some content.
I want to create an effect similar to Facebook Home Lock screen here. Images with Burns effect.
Images(wider than the screen) start with it's left part shown and scroll smoothly to right.
I've tried to View.animate.x(-50.0f) but the image appears cropped when it moves. (I used scaleType=center and the image is larger than the screen)
Any ideas?
Thanks
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.
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.
To improve the perceived startup time of my application, I am using an image as a drawable for my initial activity as described in
http://developer.android.com/resources/articles/window-bg-speed.html
and it works wonders for what it is intended to do. The application seems to be presenting its first screen within a tenth of a second, much before my onCreate is even called.
However... My application, like most applications, should display under the notification bar of the system (it is not windowFullscreen, only windowNoTitle), and the background image I specify will take the size of the full screen, its top part going under the title bar.
My application will then start and as any well-behaved application it will display content adapted to the actual size of the viewport... which means it will not match the background image.
I could possibly leave room at the top of my startup image, but even at the same screen resolution, different devices have different size notification bars, so I can't have it fit the screen smoothly that way either - not even by supplying one image for each existing screen size, because they will have different notification bar sizes.
This happens before even the first line of code of my activity is even executed - that's the whole point of putting a background image there, to give feedback to the user as early as possible, even before the activity is actually started. The only way I can see would be to somehow tell the android framework to fit my window to the region under the bar and not the whole screen, but I couldn't find how to do that. Does anyone have an idea how to make my image closely fit the interface that will then be presented by my activity ?