zoukankan      html  css  js  c++  java
  • ValidateTemplate(Label lb2, boolean iflag) {

     public static ValidateLabelBean ValidateTemplate(Label lb2, boolean iflag) {
            Label  lb = lb2;
            LogUtils.i("vv", "=========================================================>");
            boolean flag = false;
            ValidateLabelBean bean = new ValidateLabelBean();
            StringBuffer sb1 = new StringBuffer();
            StringBuffer sb2 = new StringBuffer();
            for (int i = 0; i < DrawAreaYY.dragView.lb.Elements.size(); i++) {
                sb1.append(DrawAreaYY.dragView.lb.Elements.get(i)._content);
            }
            for (int i = 0; i < lb.Elements.size(); i++) {
                sb2.append(lb.Elements.get(i)._content);
            }
            if ((DrawAreaYY.dragView.lb.printInfo.PageType == lb.printInfo.PageType) && (TextUtils.isEmpty(sb1.toString()) || TextUtils.isEmpty(sb2.toString()))&&(DrawAreaYY.dragView.lb.Elements.size()==0||lb.Elements.size()==0)) {
                LogUtils.i("vv", "00");
                if((!TextUtils.isEmpty(sb1.toString()) || TextUtils.isEmpty(sb2.toString()))){
                    DrawAreaYY.dragView.lb.baseImgUrl = lb.baseImgUrl;
                    try {
                        lb = DrawAreaYY.dragView.lb.clone();
                       // lb2.baseImgUrl =  lb.baseImgUrl;
                    }catch(Exception e){
                        LogUtils.e("NewActivityYY","ValidateTemplate e:"+e);
                    }
                }
                flag = true;
            } else if (DrawAreaYY.dragView.lb.printInfo.PageType == 2 && lb.printInfo.PageType == 2 && DrawAreaYY.dragView.lb.Height == lb.Height&&DrawAreaYY.dragView.lb.Width == lb.Width) {
                LogUtils.i("vv", "11");
                flag = true;
            } else if (DrawAreaYY.dragView.lb.printInfo.PageType == 1 && lb.printInfo.PageType == 1 && DrawAreaYY.dragView.lb.Height == lb.Height && DrawAreaYY.dragView.lb.Width == lb.Width&&(sb1.toString().trim().equals(sb2.toString().trim()))&&(DrawAreaYY.dragView.lb.printInfo.PrintInterval==lb.printInfo.PrintInterval)) {
                LogUtils.i("vv", "22");
                flag = true;
            }
            /*if(iflag&&SharePreUtil.getTheme() == R.style.YYTheme){
                flag = true;
            }*/
            else if ((!TextUtils.isEmpty(lb.baseImgUrl))&&(!TextUtils.isEmpty(DrawAreaYY.dragView.lb.baseImgUrl))&& CConst.lastWidth == lb.Width && CConst.lastHeight == lb.Height&&(lb.printInfo.PrintDirect==DrawAreaYY.dragView.lb.printInfo.PrintDirect)&&DrawAreaYY.dragView.lb.baseImgUrl.trim().equals(lb.baseImgUrl.trim())) {//CConst.lastHeight != 0 &&
                    LogUtils.i("vv", "33");
                    LogUtils.i("vv","sb1.equals(sb2)):"+sb1.equals(sb2));
                    if(sb1.toString().replaceAll(" ","").equals(sb2.toString().replaceAll(" ","")))
                    flag = true;
            }
            CConst.lastWidth = lb.Width;
            CConst.lastHeight = lb.Height;
            bean.setFlag(flag);
            bean.setLabel(lb);
            return bean;
        }
    

      

  • 相关阅读:
    Leetcode题目62.不同路径(动态规划-中等)
    Leetcode题目56.合并区间(中等)
    Leetcode题目55.跳跃游戏(贪心算法-中等)
    Leetcode题目53.最大子序和(动态规划-简单)
    Leetcode题目49.字母异位词分组(中等)
    Leetcode题目48.旋转图像(中等)
    Leetcode题目46.全排列(回溯+深度优先遍历+状态重置-中等)
    Leetcode题目39.组合总和(回溯+剪枝-中等)
    Android学习笔记-Universal-Image-Loade图片加载框架
    Android学习笔记--使用Apache HttpClient实现网络下载效果,附带进度条显示
  • 原文地址:https://www.cnblogs.com/pengmn/p/15557342.html
Copyright © 2011-2022 走看看