wallpaper

Live Wallpaper and extended background

大兔子大兔子 提交于 2019-12-07 17:31:53
问题 I'm trying to create a live wallpaper with an animation always centered in the current homescreen page, without loosing the extended background. What I'm doing right now is to draw my custom background bitmap, then draw some text on it. This is my drawframe method: final SurfaceHolder holder = getSurfaceHolder(); Canvas canvas = null; try { canvas = holder.lockCanvas(); if (canvas != null) { if(mBackgroundBitmap != null) { canvas.drawBitmap(mBackgroundBitmap, 0, 0, null); } else { canvas

Android setting wallpaper gone wrong

橙三吉。 提交于 2019-12-07 05:08:22
问题 So I was developing wallpaper changer long time ago and got it released. After a while I started receiving comment the wallpaper not resizing correctly. Also I tried on different sizes of emus and they were right. I scale the bitmap correctly etc. but somehow android tends to rescale the wallpaper even bigger! Is there way to avoid that? My code: Display display = parent.getWindowManager().getDefaultDisplay(); int width = display.getWidth(); int height = display.getHeight(); Bitmap scaled =

Is there any code to set wallpaper without cropping and zooming in android?

孤街醉人 提交于 2019-12-07 04:19:06
问题 i am creating a gallery app , my first app and this is my code Bitmap bmd = BitmapFactory.decodeStream(is); try{ getApplicationContext().setWallpaper(bmd); }catch(IOException e){ e.printStackTrace(); } The above code sets wallpaper But the wallpaper gets cropped or zoomed after it got set !! Is there any modification i can do in the above code so that i can set wallpaper without zooming or cropping when it is set !!!! Plzzzz help me out !! Thanks in advance :-) 回答1: I am late to reply this.

I cannot change Android wallpaper using WallpaperManager

拜拜、爱过 提交于 2019-12-06 21:17:26
I am trying to change Android wallpaper using code. I am using the WallpaperManager class, but with no prevail. I used a .png image in the /drawable directory. I am getting an error that says, "Expected resource of type raw". When I run the application(when that method runs), it crashes. I must be victim of a really stupid mistake. The method changeWallpaper() is run after the user taps a button. Here is my code: public void changeWallpaper(View view) { try{ WallpaperManager wallpaperManager = WallpaperManager.getInstance(getApplicationContext()); wallpaperManager.setResource(R.drawable

Detect multiple monitors and set separate wallpapers for each

ε祈祈猫儿з 提交于 2019-12-06 14:23:44
问题 I'm starting a project to make a wall paper rotator for computers with multiple monitors. 1) how do you detect the monitors in windows and the associated resolution 2) how would i set the image per monitor. do I make one image that's crafted together or do I set each one individually and how? thanks 回答1: You can get information about all screens using the System.Windows.Forms.Screen class. Use their bounds properties to determine their layout. Not possible on Windows (XP), you'll have to

IActiveDesktop wallpaper fade effect not working after restart

…衆ロ難τιáo~ 提交于 2019-12-06 11:26:03
问题 Am I missing something using IActiveDesktop? Sympthoms: After system (Win7/Win8) restart fade effect during wallpaper change disappears. To restore it I have to manually go to "Personalization->Desktop Backgrounds" and set "Picture Location" from "My Pictures"(?) back to "Windows Desktop Backgrounds" and then back(!). After this action fade effect is working fine again until the next system restart. I don't understand what reverts it back and how to stop it. How to set "Windows Desktop

Set Image as wallpaper using Intent

岁酱吖の 提交于 2019-12-06 10:25:14
I am using the following code to set the wallpaper from an image in a drawable: Intent setAsIntent = new Intent(); setAsIntent.setDataAndType(uri, "image/*"); setAsIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); setAsIntent.setAction("android.intent.action.ATTACH_DATA"); Intent chooserIntent = Intent.createChooser( setAsIntent, "set as"); But when startActivity, it only shows a message: No apps can perform this action I did discover a workaround: Intent intent = new Intent(Intent.ACTION_ATTACH_DATA); intent.addCategory(Intent.CATEGORY_DEFAULT); intent.setDataAndType(uri, "image/jpeg");

How to set Wallpaper style (Fill, stretch) according to windows version

£可爱£侵袭症+ 提交于 2019-12-06 09:47:21
问题 I am trying to make a wallpaper style stretched if Windows version is Vista, and Fill in case of windows 7, in VB.NET. I got the program to change a Wallpaper , but Im having a problem with applying a style. ( Program consists of a browse button, picture box and Apply button). Your help would be appreciated. Here is the code : Imports System.IO Imports Microsoft.Win32 Imports System.Environment Imports System.Drawing.Imaging Imports System.ComponentModel Imports System.Runtime.InteropServices

Showing Live Wallpaper in a 1.6 target app by detecting if it's a 2.1 device?

时光总嘲笑我的痴心妄想 提交于 2019-12-06 07:22:17
We're building an Android app with target SDK 1.6, so it will run on 1.6 devices and higher. We'd like to support Live Wallpapers, which we know is 2.1+ only. Is there a way to build one app with 1.6 SDK as the target, but detect if the device it's running on is 2.1, and only in that scenario call the live wallpaper API. We're trying to avoid having to build a separate 1.6 and 2.1 versions, and would like to be able to support Live Wallpapers for only 2.1 devices. So to be clear- 1 app, that can support 1.6 and higher, and support live wallpapers for 2.1 devices. Any way of doing this? Maybe.

Get color from wallpaper? - Android

蹲街弑〆低调 提交于 2019-12-06 06:46:53
问题 How can I find the (Average) color of the current wallpaper and set that color to a layout on my widget? An example of what I'm trying to do: This is a setting on AccuWeather: 回答1: First you have to get current wallpaper and convert it to bitmap like final WallpaperManager wallpaperManager = WallpaperManager.getInstance(this); final Drawable wallpaperDrawable = wallpaperManager.getDrawable(); Bitmap bitmap = ((BitmapDrawable)wallpaperDrawable).getBitmap(); After that use this link to get