Java Code Examples for android.content.Intent.ACTION_SET_WALLPAPER

The following are Jave code examples for showing how to use ACTION_SET_WALLPAPER of the android.content.Intent class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: Paper-Launcher   File: CustomizationDialog.java   View Source Code Vote up 6 votes
@Override
public void onClick(View view) {
    switch (view.getId()) {
        case R.id.customization_default_launcher:
            dismiss();

            mLauncherActivity.startActivity(new Intent("android.settings.HOME_SETTINGS"));
            break;
        case R.id.customization_wallpaper:
            dismiss();

            Intent intent = new Intent(Intent.ACTION_SET_WALLPAPER);
            mLauncherActivity.startActivityForResult(intent, LauncherActivity.WALLPAPER_SELECT_INTENT_CODE);
            break;
        case R.id.customization_edit_dock_icons:
            dismiss();

            mLauncherActivity.startDockIconsEditing();
            break;
        case R.id.customization_icon_pack:
            dismiss();

            mLauncherActivity.finish();
            mLauncherActivity.startActivity(new Intent(mLauncherActivity, IconPackChooserActivity.class));
            break;
    }
}
 
Example 2
Project: LiveWallPaper   File: MainActivity.java   View Source Code Vote up 5 votes
private void startWallpaper(){
    final Intent pickWallpaper = new Intent(Intent.ACTION_SET_WALLPAPER);
    Intent chooser = Intent.createChooser(pickWallpaper,"设置壁纸");
    startActivity(chooser);
}
 
Example 3
Project: buildAPKsSamples   File: Home.java   View Source Code Vote up 5 votes
private void startWallpaper() {
    final Intent pickWallpaper = new Intent(Intent.ACTION_SET_WALLPAPER);
    startActivity(Intent.createChooser(pickWallpaper, getString(R.string.menu_wallpaper)));
}