本文整理匯總了Java中android.app.WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER屬性的典型用法代碼示例。如果您正苦於以下問題:Java WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER屬性的具體用法?Java WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER怎麽用?Java WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類android.app.WallpaperManager
的用法示例。
在下文中一共展示了WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER屬性的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: startPreview
public void startPreview(View view) {
Intent intent = new Intent(
WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER);
intent.putExtra(WallpaperManager.EXTRA_LIVE_WALLPAPER_COMPONENT,
new ComponentName(this, JumpingBurger.class));
startActivity(intent);
}
示例2: setWallPaper
public static void setWallPaper(Context context){
Intent intent = new Intent(WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER);
intent.putExtra(WallpaperManager.EXTRA_LIVE_WALLPAPER_COMPONENT,new ComponentName(context,VideoLiveWallPaper.class));
context.startActivity(intent);
}
示例3: openLWSetter
public static void openLWSetter(Context context) {
Intent intent = new Intent(WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER);
intent.putExtra(WallpaperManager.EXTRA_LIVE_WALLPAPER_COMPONENT, new ComponentName(context, MyWallpaperService.class));
try {
context.startActivity(intent);
} catch (ActivityNotFoundException e) {
Toast.makeText(context, R.string.error_wpsetter, Toast.LENGTH_LONG).show();
}
}
示例4: onClick
@Override
public void onClick(WallpaperPickerActivity a) {
Intent preview = new Intent(WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER);
preview.putExtra(WallpaperManager.EXTRA_LIVE_WALLPAPER_COMPONENT,
mInfo.getComponent());
a.startActivityForResultSafely(preview,
WallpaperPickerActivity.PICK_WALLPAPER_THIRD_PARTY_ACTIVITY);
}
示例5: enableWallpaper
private void enableWallpaper() {
Intent intent = new Intent(WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER);
intent.putExtra(WallpaperManager.EXTRA_LIVE_WALLPAPER_COMPONENT,
new ComponentName(this, MainWallpaperService.class));
startActivity(intent);
finish();
}
示例6: onConnected
@Override
public void onConnected(Bundle bundle) {
Intent intent = new Intent(WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER);
intent.putExtra(WallpaperManager.EXTRA_LIVE_WALLPAPER_COMPONENT, new ComponentName(MainActivity.this, DripWallpaperService.class));
startActivity(intent);
finish();
}
示例7: onClick
@Override
public void onClick(WallpaperPickerActivity a) {
Intent preview = new Intent(WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER);
preview.putExtra(WallpaperManager.EXTRA_LIVE_WALLPAPER_COMPONENT,
mInfo.getComponent());
a.onLiveWallpaperPickerLaunch(mInfo);
a.startActivityForResultSafely(preview, WallpaperPickerActivity.PICK_LIVE_WALLPAPER);
}
示例8: onSetWallpaperClick
@Override
public void onSetWallpaperClick(View v)
{
try{
Intent intent = new Intent(WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER);
intent.putExtra(WallpaperManager.EXTRA_LIVE_WALLPAPER_COMPONENT,
new ComponentName(this, PuvoWallpaperService.class));
startActivity(intent);
this.finish();
}
catch(Exception e){
super.onSetWallpaperClick(v);
}
}
示例9: changeLiveWallPaper
public static void changeLiveWallPaper(Context context) {
Intent intent = new Intent(WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER);
intent.putExtra(WallpaperManager.EXTRA_LIVE_WALLPAPER_COMPONENT,
new ComponentName(context, EarthWallpaperService.class));
intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
try {
context.startActivity(intent);
} catch (ActivityNotFoundException ignored) {
}
}
示例10: setToWallPaper
public static void setToWallPaper(Context context) {
final Intent intent = new Intent(WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER);
intent.putExtra(WallpaperManager.EXTRA_LIVE_WALLPAPER_COMPONENT,
new ComponentName(context, VideoLiveWallpaper.class));
context.startActivity(intent);
}
示例11: initWallpaper
public void initWallpaper() {
Intent intent = new Intent(WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER);
intent.putExtra(WallpaperManager.EXTRA_LIVE_WALLPAPER_COMPONENT,
new ComponentName(this, WhatColourIsItService.class));
startActivityForResult(intent, 111);
}
示例12: isSupported
public static boolean isSupported(Context context) {
Intent intent = new Intent(WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER);
return intent.resolveActivity(context.getPackageManager()) != null;
}