|  | @@ -1,12 +1,14 @@
 | 
	
		
			
				|  |  |  package com.emato.ich.fragment;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import android.app.AlertDialog;
 | 
	
		
			
				|  |  | +import android.graphics.Color;
 | 
	
		
			
				|  |  |  import android.os.Bundle;
 | 
	
		
			
				|  |  |  import android.os.CountDownTimer;
 | 
	
		
			
				|  |  |  import com.emato.ich.utils.Log;
 | 
	
		
			
				|  |  |  import android.view.LayoutInflater;
 | 
	
		
			
				|  |  |  import android.view.View;
 | 
	
		
			
				|  |  |  import android.view.ViewGroup;
 | 
	
		
			
				|  |  | +import android.widget.TextView;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import androidx.annotation.NonNull;
 | 
	
		
			
				|  |  |  import androidx.annotation.Nullable;
 | 
	
	
		
			
				|  | @@ -37,6 +39,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 | 
	
		
			
				|  |  |  import org.jetbrains.annotations.NotNull;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import java.io.IOException;
 | 
	
		
			
				|  |  | +import java.lang.reflect.Field;
 | 
	
		
			
				|  |  |  import java.util.Objects;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import okhttp3.Call;
 | 
	
	
		
			
				|  | @@ -218,8 +221,10 @@ public class SendInfoConfirmFragment extends Fragment {
 | 
	
		
			
				|  |  |  //            bundle.putString("exception", "exception_page");
 | 
	
		
			
				|  |  |  //            finalActivity.getBundleMap().put(SendInfoConfirmFragment.class.getName(), bundle);
 | 
	
		
			
				|  |  |              AlertDialog alertDialog = new AlertDialog.Builder(finalActivity)
 | 
	
		
			
				|  |  | -                    .setTitle("e站通")
 | 
	
		
			
				|  |  | -                    .setMessage("点击未投递会取消本次投递!并且取消投递后的订单状态为预下单!确认取消吗?")
 | 
	
		
			
				|  |  | +                    //.setTitle("e站通")
 | 
	
		
			
				|  |  | +                    .setTitle("温馨提示")
 | 
	
		
			
				|  |  | +                    //.setMessage("点击未投递会取消本次投递!并且取消投递后的订单状态为预下单!确认取消吗?")
 | 
	
		
			
				|  |  | +                    .setMessage("点击未投递会取消本次投递!\n并且取消投递后的订单状态为预下单!\n确认取消吗?")
 | 
	
		
			
				|  |  |                      .setPositiveButton("确认", (dialog, which) -> {
 | 
	
		
			
				|  |  |                          // 是, 取消本次投递
 | 
	
		
			
				|  |  |                          ConfirmOrderVo confirmOrderVo = new ConfirmOrderVo();
 | 
	
	
		
			
				|  | @@ -253,15 +258,43 @@ public class SendInfoConfirmFragment extends Fragment {
 | 
	
		
			
				|  |  |                          dialog.dismiss();
 | 
	
		
			
				|  |  |                      }).create();
 | 
	
		
			
				|  |  |              alertDialog.show();
 | 
	
		
			
				|  |  | +            alertDialog.getButton(androidx.appcompat.app.AlertDialog.BUTTON_POSITIVE).setBackgroundColor(Color.BLUE);
 | 
	
		
			
				|  |  | +            alertDialog.getButton(androidx.appcompat.app.AlertDialog.BUTTON_POSITIVE).setTextSize(20);
 | 
	
		
			
				|  |  | +            alertDialog.getButton(androidx.appcompat.app.AlertDialog.BUTTON_NEGATIVE).setTextSize(20);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            try {
 | 
	
		
			
				|  |  | +                //获取mAlert对象
 | 
	
		
			
				|  |  | +                Field mAlert = androidx.appcompat.app.AlertDialog.class.getDeclaredField("mAlert");
 | 
	
		
			
				|  |  | +                mAlert.setAccessible(true);
 | 
	
		
			
				|  |  | +                Object mAlertController = mAlert.get(alertDialog);
 | 
	
		
			
				|  |  | +                //获取mTitleView并设置大小颜色
 | 
	
		
			
				|  |  | +                Field mTitle = mAlertController.getClass().getDeclaredField("mTitleView");
 | 
	
		
			
				|  |  | +                mTitle.setAccessible(true);
 | 
	
		
			
				|  |  | +                TextView mTitleView = (TextView) mTitle.get(mAlertController);
 | 
	
		
			
				|  |  | +                mTitleView.setTextSize(25);
 | 
	
		
			
				|  |  | +                mTitleView.setTextColor(Color.BLUE);
 | 
	
		
			
				|  |  | +                //获取mMessageView并设置大小颜色
 | 
	
		
			
				|  |  | +                Field mMessage = mAlertController.getClass().getDeclaredField("mMessageView");
 | 
	
		
			
				|  |  | +                mMessage.setAccessible(true);
 | 
	
		
			
				|  |  | +                TextView mMessageView = (TextView) mMessage.get(mAlertController);
 | 
	
		
			
				|  |  | +                mMessageView.setTextSize(18);
 | 
	
		
			
				|  |  | +                mMessageView.setTextColor(Color.BLACK);
 | 
	
		
			
				|  |  | +            } catch (IllegalAccessException e) {
 | 
	
		
			
				|  |  | +                e.printStackTrace();
 | 
	
		
			
				|  |  | +            } catch (NoSuchFieldException e) {
 | 
	
		
			
				|  |  | +                e.printStackTrace();
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        binding.returnMainBtn.setOnClickListener(view1 -> {
 | 
	
		
			
				|  |  | +        binding.mainBtn.setOnClickListener(view1 -> {
 | 
	
		
			
				|  |  |              if (ButtonUtils.isFastClick()) {
 | 
	
		
			
				|  |  |                  return;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              AlertDialog alertDialog = new AlertDialog.Builder(finalActivity)
 | 
	
		
			
				|  |  | -                    .setTitle("e站通")
 | 
	
		
			
				|  |  | -                    .setMessage("返回主页会取消本次投递!并且本次投递的订单状态为预下单!确认取消吗?")
 | 
	
		
			
				|  |  | +                    //.setTitle("e站通")
 | 
	
		
			
				|  |  | +                    .setTitle("温馨提示")
 | 
	
		
			
				|  |  | +                    //.setMessage("返回主页会取消本次投递!并且本次投递的订单状态为预下单!确认取消吗?")
 | 
	
		
			
				|  |  | +                    .setMessage("返回主页会取消本次投递!\n并且本次投递的订单状态为预下单!\n确认取消吗?")
 | 
	
		
			
				|  |  |                      .setPositiveButton("确认", ((dialog, which) -> {
 | 
	
		
			
				|  |  |                          if (null != timer) {
 | 
	
		
			
				|  |  |                              timer.cancel();
 | 
	
	
		
			
				|  | @@ -276,6 +309,83 @@ public class SendInfoConfirmFragment extends Fragment {
 | 
	
		
			
				|  |  |                          dialog.dismiss();
 | 
	
		
			
				|  |  |                      })).create();
 | 
	
		
			
				|  |  |              alertDialog.show();
 | 
	
		
			
				|  |  | +            alertDialog.getButton(androidx.appcompat.app.AlertDialog.BUTTON_POSITIVE).setBackgroundColor(Color.BLUE);
 | 
	
		
			
				|  |  | +            alertDialog.getButton(androidx.appcompat.app.AlertDialog.BUTTON_POSITIVE).setTextSize(20);
 | 
	
		
			
				|  |  | +            alertDialog.getButton(androidx.appcompat.app.AlertDialog.BUTTON_NEGATIVE).setTextSize(20);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            try {
 | 
	
		
			
				|  |  | +                //获取mAlert对象
 | 
	
		
			
				|  |  | +                Field mAlert = androidx.appcompat.app.AlertDialog.class.getDeclaredField("mAlert");
 | 
	
		
			
				|  |  | +                mAlert.setAccessible(true);
 | 
	
		
			
				|  |  | +                Object mAlertController = mAlert.get(alertDialog);
 | 
	
		
			
				|  |  | +                //获取mTitleView并设置大小颜色
 | 
	
		
			
				|  |  | +                Field mTitle = mAlertController.getClass().getDeclaredField("mTitleView");
 | 
	
		
			
				|  |  | +                mTitle.setAccessible(true);
 | 
	
		
			
				|  |  | +                TextView mTitleView = (TextView) mTitle.get(mAlertController);
 | 
	
		
			
				|  |  | +                mTitleView.setTextSize(25);
 | 
	
		
			
				|  |  | +                mTitleView.setTextColor(Color.BLUE);
 | 
	
		
			
				|  |  | +                //获取mMessageView并设置大小颜色
 | 
	
		
			
				|  |  | +                Field mMessage = mAlertController.getClass().getDeclaredField("mMessageView");
 | 
	
		
			
				|  |  | +                mMessage.setAccessible(true);
 | 
	
		
			
				|  |  | +                TextView mMessageView = (TextView) mMessage.get(mAlertController);
 | 
	
		
			
				|  |  | +                mMessageView.setTextSize(18);
 | 
	
		
			
				|  |  | +                mMessageView.setTextColor(Color.BLACK);
 | 
	
		
			
				|  |  | +            } catch (IllegalAccessException e) {
 | 
	
		
			
				|  |  | +                e.printStackTrace();
 | 
	
		
			
				|  |  | +            } catch (NoSuchFieldException e) {
 | 
	
		
			
				|  |  | +                e.printStackTrace();
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        binding.backHome.setOnClickListener(view1 -> {
 | 
	
		
			
				|  |  | +            if (ButtonUtils.isFastClick()) {
 | 
	
		
			
				|  |  | +                return;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            AlertDialog alertDialog = new AlertDialog.Builder(finalActivity)
 | 
	
		
			
				|  |  | +                    //.setTitle("e站通")
 | 
	
		
			
				|  |  | +                    .setTitle("温馨提示")
 | 
	
		
			
				|  |  | +                    //.setMessage("返回主页会取消本次投递!并且本次投递的订单状态为预下单!确认取消吗?")
 | 
	
		
			
				|  |  | +                    .setMessage("返回主页会取消本次投递!\n并且本次投递的订单状态为预下单!\n确认取消吗?")
 | 
	
		
			
				|  |  | +                    .setPositiveButton("确认", ((dialog, which) -> {
 | 
	
		
			
				|  |  | +                        if (null != timer) {
 | 
	
		
			
				|  |  | +                            timer.cancel();
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                        boolean isException = false;
 | 
	
		
			
				|  |  | +                        if (LocalStorage.getInstance().getSession().getException()) {
 | 
	
		
			
				|  |  | +                            isException = true;
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                        LocalStorage.getInstance().cleanSession(((MainActivity) getActivity()), isException);
 | 
	
		
			
				|  |  | +                        NavUtils.navigate(this, R.id.action_sendInfoConfirmFragment_to_mainFragment);
 | 
	
		
			
				|  |  | +                    })).setNegativeButton("取消", ((dialog, which) -> {
 | 
	
		
			
				|  |  | +                        dialog.dismiss();
 | 
	
		
			
				|  |  | +                    })).create();
 | 
	
		
			
				|  |  | +            alertDialog.show();
 | 
	
		
			
				|  |  | +            alertDialog.getButton(androidx.appcompat.app.AlertDialog.BUTTON_POSITIVE).setBackgroundColor(Color.BLUE);
 | 
	
		
			
				|  |  | +            alertDialog.getButton(androidx.appcompat.app.AlertDialog.BUTTON_POSITIVE).setTextSize(20);
 | 
	
		
			
				|  |  | +            alertDialog.getButton(androidx.appcompat.app.AlertDialog.BUTTON_NEGATIVE).setTextSize(20);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            try {
 | 
	
		
			
				|  |  | +                //获取mAlert对象
 | 
	
		
			
				|  |  | +                Field mAlert = androidx.appcompat.app.AlertDialog.class.getDeclaredField("mAlert");
 | 
	
		
			
				|  |  | +                mAlert.setAccessible(true);
 | 
	
		
			
				|  |  | +                Object mAlertController = mAlert.get(alertDialog);
 | 
	
		
			
				|  |  | +                //获取mTitleView并设置大小颜色
 | 
	
		
			
				|  |  | +                Field mTitle = mAlertController.getClass().getDeclaredField("mTitleView");
 | 
	
		
			
				|  |  | +                mTitle.setAccessible(true);
 | 
	
		
			
				|  |  | +                TextView mTitleView = (TextView) mTitle.get(mAlertController);
 | 
	
		
			
				|  |  | +                mTitleView.setTextSize(25);
 | 
	
		
			
				|  |  | +                mTitleView.setTextColor(Color.BLUE);
 | 
	
		
			
				|  |  | +                //获取mMessageView并设置大小颜色
 | 
	
		
			
				|  |  | +                Field mMessage = mAlertController.getClass().getDeclaredField("mMessageView");
 | 
	
		
			
				|  |  | +                mMessage.setAccessible(true);
 | 
	
		
			
				|  |  | +                TextView mMessageView = (TextView) mMessage.get(mAlertController);
 | 
	
		
			
				|  |  | +                mMessageView.setTextSize(18);
 | 
	
		
			
				|  |  | +                mMessageView.setTextColor(Color.BLACK);
 | 
	
		
			
				|  |  | +            } catch (IllegalAccessException e) {
 | 
	
		
			
				|  |  | +                e.printStackTrace();
 | 
	
		
			
				|  |  | +            } catch (NoSuchFieldException e) {
 | 
	
		
			
				|  |  | +                e.printStackTrace();
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      }
 |