wallpaper

How to set image as wallpaper from the ImageView?

笑着哭i 提交于 2019-12-03 20:48:41
I have an activity in which there are two Buttons and an ImageView. One button is to take image from the Camera application of the phone and set it to the ImageView, and other Button is to set that image as the Home screen wallpaper so i want the code how to set this image from the ImageView to the wallpaper??????? Shajeel Afzal Step 1: Get the image attached to the ImageView. Setp 2: Set that image as Wallpaper. Step 3: Add permission in the AndroidManifest.xml to set wallpaper! For step 1 check This answer! imageView.buildDrawingCache(); Bitmap bmap = imageView.getDrawingCache(); For step 2:

How to create Live Wallpaper in Android? [closed]

末鹿安然 提交于 2019-12-03 13:12:23
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Can someone guide me how to create a live wallpaper in Android. And also, is there a process to use the photos within the gif and implement them into a live wallpaper? Because that's exactly what I am looking for If you want to explore more, and use a template for it. You should check andEngine template for creating livewallpaper, http://www.andengine.org/forums/tutorials/live-wallpaper-template-t258.html 来源: https:/

Shell script changing desktop wallpaper

好久不见. 提交于 2019-12-03 12:13:00
问题 Could you write the easiest possible shell script that will change the desktop wallpaper (in Ubuntu) in regular intervals (e.g. 1 minute). Wallpapers will be saved in particular directory (e.g. $HOME/wallpapers). I need only basic functionality. 1) select random wallpaper from $HOME/wallpapers 2) set it as wallpaper on desktop 3) set cron to run the script every minute (not part of the question). 回答1: #!/bin/bash wallpaperdir='$HOME/wallpaper' files=($wallpaperdir/*) randompic=`printf "%s\n"

Getting desktop background on Mac

十年热恋 提交于 2019-12-03 08:17:44
How do I get the current wallpaper on a Mac? Just point me to an API function so I can Google more. Edit: I think I found it. [NSUserDefaults standardUserDefaults] mentioned at http://lists.apple.com/archives/student-dev/2004/Aug/msg00140.html Also possible from shell: defaults read com.apple.desktop Background And from AppleScript: http://discussions.apple.com/thread.jspa?messageID=7111272 Updated Answer (Mavericks and newer) Starting with Mavericks, Apple writes the Desktop images to /Users/<current-user>/Application Support/Dock/desktoppicture.db which is an SQLite database. You can open

How to set wallpaper in Android

走远了吗. 提交于 2019-12-03 03:30:43
I am using Android SDK 1.6. Could someone tell me how to set an image as the wallpaper in the homescreen. getApplicationContext().setWallpaper(); seems to be not working for me. You have to add the SET_WALLPAPER permission to your AndroidManifest.xml <manifest xlmns:android...> ... <uses-permission android:name="android.permission.SET_WALLPAPER" /> </manifest> 来源: https://stackoverflow.com/questions/2856993/how-to-set-wallpaper-in-android

Shell script changing desktop wallpaper

橙三吉。 提交于 2019-12-03 02:35:37
Could you write the easiest possible shell script that will change the desktop wallpaper (in Ubuntu) in regular intervals (e.g. 1 minute). Wallpapers will be saved in particular directory (e.g. $HOME/wallpapers). I need only basic functionality. 1) select random wallpaper from $HOME/wallpapers 2) set it as wallpaper on desktop 3) set cron to run the script every minute (not part of the question). #!/bin/bash wallpaperdir='$HOME/wallpaper' files=($wallpaperdir/*) randompic=`printf "%s\n" "${files[RANDOM % ${#files[@]}]}"` gconftool-2 -t str --set /desktop/gnome/background/picture_filename "

Avoid a wallpaper to stretch across 5 screens

谁都会走 提交于 2019-12-03 00:47:47
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

Setting wallpaper with Win API

≡放荡痞女 提交于 2019-12-02 05:00:13
问题 I want to programmatically set a wallpaper. Here's the only solution I've found so far: SystemParametersInfoW(SPI_SETDESKWALLPAPER, 1, (void*)wallpaperImageFilePath.utf16(), SPIF_UPDATEINIFILE | SPIF_SENDCHANGE); My question is: how to tell Windows I want the wallpaper image centered (not resized)? The solution above always sets the image in stretch mode. According to MSDN, there are no flags to accompany SPI_SETDESKWALLPAPER . 回答1: There is no API function for setting the wallpaper

C#: Set Desktop Wallpaper to a Solid Color

痞子三分冷 提交于 2019-12-01 18:45:12
I'm using this code to remove the current wallpaper and set a solid color: public static class WallpaperColorChanger { public static void SetColor(Color color) { // Remove the current wallpaper NativeMethods.SystemParametersInfo( NativeMethods.SPI_SETDESKWALLPAPER, 0, "", NativeMethods.SPIF_UPDATEINIFILE | NativeMethods.SPIF_SENDWININICHANGE); // Set the new desktop solid color for the current session int[] elements = { NativeMethods.COLOR_DESKTOP }; int[] colors = { System.Drawing.ColorTranslator.ToWin32(color) }; NativeMethods.SetSysColors(elements.Length, elements, colors); // Save value in

Android: How can I programmatically draw text on key guard screen / lock screen?

北城余情 提交于 2019-12-01 11:30:36
Is there a way to draw on or modify the key guard wallpaper programmatically? It looks simple enough for the home wallpaper, you can use WallpaperManager. But how about for the lock screen wallpaper? I would like to draw some text there. There is no API to draw on the lock screen. 来源: https://stackoverflow.com/questions/4065201/android-how-can-i-programmatically-draw-text-on-key-guard-screen-lock-screen