How to set the wallpaper on Android

1. Call the intent.action of the system_ ATTACH_ Data, the intent will evoke all wallpaper setting programs and contact avatar setting programs. Users can choose through chooseactivity:

The intent is a standard intent, so all settings will be supported

2. Settings via wallpapermanager

This method can directly set the picture as wallpaper, which is used for Android systems on all platforms, but the picture cannot be cut / adjusted.

You need to declare permissions in androidmanifest.xml:

<uses-permission android:name = "android.permission.SET_WALLPAPER"/>

The above operation method of setting up wallpaper on Android is all the content shared by Xiaobian. I hope it can give you a reference and support more programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>