wallpaper

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

假装没事ソ 提交于 2019-12-01 09:14:05
问题 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. 回答1: 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

how to fit the whole image on screen as wallpaper

删除回忆录丶 提交于 2019-12-01 05:49:53
I am developing an app which picks an image from the gallery and then sets that image as the wallpaper. But here problem is that only part of image is set as wallpaper not the whole image, but I want to set the whole image as the wallpaper. can you please tell me how that can be done ??? Here is my code... public class Scaleimage extends Activity { /** Called when the activity is first created. */ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); String FileName; File file = new File("/sdcard/pictures"); File[] imageFiles =

how to fit the whole image on screen as wallpaper

我的梦境 提交于 2019-12-01 04:04:56
问题 I am developing an app which picks an image from the gallery and then sets that image as the wallpaper. But here problem is that only part of image is set as wallpaper not the whole image, but I want to set the whole image as the wallpaper. can you please tell me how that can be done ??? Here is my code... public class Scaleimage extends Activity { /** Called when the activity is first created. */ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

How to set image as wallpaper programmatically?

青春壹個敷衍的年華 提交于 2019-12-01 02:35:54
问题 I have been developing the application which need to set an image as wallpaper. Code: WallpaperManager m=WallpaperManager.getInstance(this); String s=Environment.getExternalStorageDirectory().getAbsolutePath()+"/1.jpg"; File f=new File(s); Log.e("exist", String.valueOf(f.exists())); try { InputStream is=new BufferedInputStream(new FileInputStream(s)); m.setBitmap(BitmapFactory.decodeFile(s)); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); Log.e(

How to set wallpaper from imageview

别说谁变了你拦得住时间么 提交于 2019-12-01 02:09:48
I am still can't find the way to set wallpaper that the image getting from ImageView. Anyone can show me the way to set phone wallpaper from android ImageView? Here is my code: ImageView Layout: <ImageView android:contentDescription="My Wallpaper" android:id="@+id/full_image_view" android:layout_width="fill_parent" android:layout_height="fill_parent" android:saveEnabled="true" /> Activity on Image View Please noted that the image that showing in FullImageActivity is getting from image GridView after user clicked on item. public class FullImageActivity extends Activity { @Override public void

system wallpaper should change through service

橙三吉。 提交于 2019-12-01 02:00:59
my application requires a service that changes the system wallpaper in a particular time interval how should I implement this, please help??? Yahor10 Create your service class class WallpaperService extends IntentService { @Override protected void onHandleIntent(Intent intent) { Timer progressTimer = new Timer(); timeTask = new ProgressTimerTask(); progressTimer.scheduleAtFixedRate(timeTask, 0, 1000); } private class ProgressTimerTask extends TimerTask { @Override public void run() { runOnUiThread(new Runnable() { @Override public void run() { int currenMinutes = 0; // set your time here

Using WallpaperManager in Android to set wallpaper

ε祈祈猫儿з 提交于 2019-11-30 10:13:08
Below are my codes, I want to use wallpaper manager to set as wallpaper. I'm using Universal Image Loader , but i dont know how implement wallpaper manager. My setWall() is not working, kinda confusing. import android.graphics.Bitmap; import android.os.Bundle; import android.os.Parcelable; import android.support.v4.view.PagerAdapter; import android.support.v4.view.ViewPager; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android

Get the current wallpaper in Cocoa

≡放荡痞女 提交于 2019-11-30 09:09:35
I'm using this code to get the current wallpaper: NSURL *imageURL = [[NSWorkspace sharedWorkspace] desktopImageURLForScreen:[NSScreen mainScreen]]; This works fine, but when i set a folder of pictures to be the wallpaper(As shown in the picture), the imageURL is a directory, so how can i get the current wallpaper's USURL in this situation? I've been trying to do the exact same thing. You can get the current desktop picture URL by: Getting the current space UUID from the com.apple.spaces property list, Searching the com.apple.desktop property list for the matching space, Extracting the URL from

Change Windows Background from Python

五迷三道 提交于 2019-11-30 08:34:33
问题 Does anyone know a way to change the Windows Desktop Wallpaper with python so that the change is permanent? I have found this code import ctypes SPI_SETDESKWALLPAPER = 20 ctypes.windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, "myimage.jpg" , 0) This code works, but once you log off and log on again, the background is back to the original image. I would prefer a solution that does not require any registry edit, and I would like something that works with Windows XP and 7 if it is

Change the wallpaper on all desktops in OS X 10.7 Lion?

本小妞迷上赌 提交于 2019-11-30 08:27:27
I would like to change the wallpaper of all desktops (formerly "spaces") on a screen. As of OS X 10.6 there is a category to NSWorkspace which allows the setting of the wallpaper, however, when I use this function only the wallpaper of the current desktop gets changed and all the other desktops remain unchanged. I then looked at the desktop preferences plist and wrote a class that modifies it to reflect the changes I want (basically set a new image file path). After the new file was saved I sent the com.apple.desktop "BackgroundChanged" notification - Google if you don't know what I am talking