package com.zbar.lib.decode;import android.app.Activity;import android.content.DialogInterface;public final class FinishListener implements DialogInterface.OnClickListener, DialogInterface.OnCancelListener, Runnable{private final Activity activityToFinish;public FinishListener(Activity activityToFinish){this.activityToFinish = activityToFinish;}public void onCancel(DialogInterface dialogInterface){run();}public void onClick(DialogInterface dialogInterface, int i){run();}public void run(){activityToFinish.finish();}}
实现对Activity的定时关闭功能
最新推荐文章于 2023-06-07 08:48:38 发布