如何在一次单击中杀死整个应用程序..finish() 不起作用?它重定向到以前的活动...请指导我。
public void onClick(View arg0) {
// TODO Auto-generated method stub
WallpaperManager wp = WallpaperManager
.getInstance(getApplicationContext());
try {
Display d = ((WindowManager) getSystemService(Context.WINDOW_SERVICE))
.getDefaultDisplay();
int width = d.getWidth();
int height = d.getHeight();
wp.setBitmap(b1);
} catch (IOException e) {
Log.e("error", "Cannot set image as wallpaper", e);
}
finish();
}