How can I clean up Android desktops?
Override the clearwallpaper method defined in contextwrapper IN THE ACTIVITY
@ Override
Public void clearwallpaper () throws ioexception
{
// Todo auto-generated method stub
Super. clearwallpaper ();
}
You can do it. Of course, if we clean up the desktop, the user is setting the desktop. In the event of a conflict, the ioexception will be thrown.
Bytes ---------------------------------------------------------------------------------------------
How can I change background images for Android desktops?
@ Override
Public void setwallpaper (Bitmap bitmap) throws ioexception {
Super. setwallpaper (Bitmap );
}
(Bitmapfactory has a large number of methods for me to obtain bitmap objects through images. In addition, bitmap also has many static methods to create a bitmap object for Desktop Replacement .)
@ Override
Public void setwallpaper (inputstream data) throws ioexception {
Super. setwallpaper (data );
}
The resources object can be called. The openrawresources method is used to obtain an inputstream through images.
----------------------------------------------------------------------
How can I obtain the current Android desktop image?
@ Override
Public drawable getwallpaper (){
Return super. getwallpaper ();
}
And
Public drawable peekwallpaper (){
Return super. peekwallpaper ();
} Yes. The difference between the two is that when there is no desktop, getwallpaper returns the Default background of the system, while peekwallpaper returns NULL.
--------------------------------------------------------------------------------