本文整理汇总了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;
}