如何杀死onne单击完整的应用程序..完成()不工作?它重定向到以前的活动......请指导我。Android杀死进程
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();
}
使用system.exit(0); – Riser
虽然人们回答你的问题,你应该看看Gunaseelan的帖子并阅读“退出申请 - 是否皱眉?” http://stackoverflow.com/questions/2033914/quitting-an-application-is-that-frowned-upon。 – Ryan
对不起,我试过了......但不工作 – Coder