wallpaper

android set the image I crop as wallpaper

佐手、 提交于 2019-12-11 07:29:51
问题 I just crop the image to get part of it. But Android set the returned image as the wallpaper. Why? I track the android code, and in Gallery3D application(com.cooliris), I found this: // TODO: A temporary file is NOT necessary // The CropImage intent should be able to set the wallpaper directly // without writing to a file, which we then need to read here to write // it again as the final wallpaper, this is silly mTempFile = getFileStreamPath("temp-wallpaper"); mTempFile.getParentFile().mkdirs

use phone wallpaper as app background - Theme.Wallpaper like behaviour

孤人 提交于 2019-12-11 07:22:14
问题 I wanted to use Theme.Wallpaper in my app. This theme uses the phones current wallpaper as a background. The problem is it doesn't work on a 4.1 device. I also tried recreating the Theme.Wallpaper in my style resources but again it doesn't work for 4.1 devices. - note that it may not work for lower APIs as well, I only confirmed it working on 2.2.1 and not working on 4.1. I would like to know why it doesn't work and if there is any solution to that. 回答1: I have finally found the answer, it's

Change Home Wallpaper

好久不见. 提交于 2019-12-11 07:18:16
问题 I have a application that have a lot of images, and I want to programmatically do a random chanegs of images on my phone backgroind. Is it possible to change wallpaper on android ? 回答1: Use a WallpaperManager. Also, you'll have to include this permission: <uses-permission android:name="android.permission.SET_WALLPAPER" /> 来源: https://stackoverflow.com/questions/6190417/change-home-wallpaper

How does one detect when the wallpaper has changed (Windows XP or greater)?

一曲冷凌霜 提交于 2019-12-10 17:33:53
问题 I have figured out how to change the desktop wallpaper (there are dozens of examples on the Internet.) One thing that still eludes me: how do I detect when the wallpaper has changed? (Say via the Display control panel or another program changing it.) 回答1: Add a message handler for WM_SETTINGCHANGE, SystemEvents.UserPreferenceChanged in .NET. Check if the wallpaper is still the same. 回答2: Here is an example in C# to retrieve the wallpaper. All you would need to add is some additional code to

How to put a wallpaper inside an apk file?

浪尽此生 提交于 2019-12-10 12:01:03
问题 I'm planning to release a nice clock widget and I'd like to include a pretty wallpaper with it (want to do this because previously got some comments like "can i get the matching wallpaper? ;)") So I tried to google on how to put some image file inside apk so that it would appear in wallpapers selection list after installation. I mean the list which appears when doing Home=>Menu=>Wallpaper=>Wallpaper Gallery or Pictures - whatever. So far didn't find any hints, so decided to try to ask here.

Set Image Wallaper of ViewPager in Universal Image Loader UIL

我与影子孤独终老i 提交于 2019-12-10 11:36:54
问题 I am Using Nostra Universal Image Loader plugin, I would like to be able to see the currently image on the ViewPager as the Phone Wallpaper. My code below can set the wallpaper, but its not he currently image thats is displaying on the ViewPager, it will be a image before or a image after, and sometimes a ramdom image of the Sting Array. public class ImagePagerFragment extends Fragment { public static final String TAG = ImagePagerFragment.class.getSimpleName(); VarController vc; public static

Cropping/zooming not working while setting iOS Wallpaper using PhotoLibrary private framework

无人久伴 提交于 2019-12-10 11:09:24
问题 I have managed (with the help of this post) to open up a PLStaticWallpaperImageViewController from the PhotoLibrary private framework, which allows the direct setting of the wallpaper and lock screen (using same UI as the Photos app). Unfortunately, the image cropping/zooming features don't seem to work, as touches to the image view itself don't seem to be coming through (the main view is also not dismissed properly after the cancel/set buttons are touched, but this isn't so important). I

Set app background to be the same as home screen wallpaper

吃可爱长大的小学妹 提交于 2019-12-10 02:45:00
问题 I want to set my app's background to be the same as my home screen's wallpaper. How can I get the home screen wallpaper in activity.xml? Can I do that? 回答1: Use final WallpaperManager wallpaperManager = WallpaperManager.getInstance(this); final Drawable wallpaperDrawable = wallpaperManager.getDrawable(); to get the current wallpaper. Then set it as your own app's background: LinearLayout ll = (LinearLayout) findViewById(R.id.myLinearLayout);//Substitute with your layout ll.setBackground

Getting all system wallpapers

荒凉一梦 提交于 2019-12-09 16:48:21
问题 Is there a way to programatically get all the android system wallpapers? I know how to get the current one, via WallpaperManager , and then save it to disk. But I want to know if there is a way to access all the pictures that act as system wallpaper included with the O.S. 回答1: All the wallpapers are located in the launcher app. As the name of the launcher and its resources may vary accross devices, there is no way to create a reliable way to do this. On stock Android the wallpapers are

setting wallpaper through code

岁酱吖の 提交于 2019-12-09 07:12:29
问题 I was trying to make an app which also had the facility to let user select wallpaper he would like to set. I have managed this by calling the Gallery Intent. Once the user selects a specific image, the data path of the image is returned to me which then i preview to the user by setting the image onto an imageview. The problem crops up when the image size (and/or resolution) is greater than what android expects. This results in failure of my module. And as if this was not enough, wen the user