private fun setWallpaper() { | |
val dialog = ProgressDialog() | |
dialog.isCancelable = false | |
dialog.title = getString(R.string.setting_up_wallpaper) | |
dialog.show(fragmentManager, "") | |
runInBackground { | |
WallpaperManager.getInstance(activity).setStream(FileInputStream(imageFile)) | |
runInMainThread { | |
dialog.dismiss() | |
toast(R.string.wallpaper_set) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment