lizhanwei
2020-03-31 92e94ca7d81ab4606338e1a55c06a7f12d1f2905
修改主界面退出系统,目前只是把app推到后台
1个文件已修改
36 ■■■■■ 已修改文件
app/src/main/java/safeluck/drive/evaluation/fragment/HomeFragment.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/safeluck/drive/evaluation/fragment/HomeFragment.java
@@ -1,6 +1,7 @@
package safeluck.drive.evaluation.fragment;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.Gravity;
@@ -13,7 +14,10 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import com.anyun.exam.lib.AYSdk;
import me.yokeyword.fragmentation.ISupportFragment;
import me.yokeyword.fragmentation.SupportFragment;
@@ -96,23 +100,23 @@
                break;
            case R.id.exit_sys:
                //退出系统
//                AlertDialog.Builder builder = new AlertDialog.Builder(_mActivity);
//                builder.setMessage("您将退出系统,请确认数据已保存").setPositiveButton("确定", new DialogInterface.OnClickListener() {
//                    @Override
//                    public void onClick(DialogInterface dialog, int which) {
//                        _mActivity.finish();
//                    }
//                }).setNegativeButton("取消", new DialogInterface.OnClickListener() {
//                    @Override
//                    public void onClick(DialogInterface dialog, int which) {
//                        dialog.dismiss();
//                    }
//                }).show();
                    TakePhotoFragment takePhotoFragment = findFragment(TakePhotoFragment.class);
                    if (takePhotoFragment == null){
                        takePhotoFragment = TakePhotoFragment.newInstance();
                AlertDialog.Builder builder = new AlertDialog.Builder(_mActivity);
                builder.setMessage("您将退出系统,请确认数据已保存").setPositiveButton("确定", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        _mActivity.finish();
                    }
                    start(takePhotoFragment);
                }).setNegativeButton("取消", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        dialog.dismiss();
                    }
                }).show();
//                    TakePhotoFragment takePhotoFragment = findFragment(TakePhotoFragment.class);
//                    if (takePhotoFragment == null){
//                        takePhotoFragment = TakePhotoFragment.newInstance();
//                    }
//                    start(takePhotoFragment);
                break;
            case R.id.system_setting: