(bean.bgRes>0)
                    window.setBackgroundDrawableResource(bean.bgRes);
                else {
                    window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
                }

            }
        }else {
            if(bean.type == DefaultConfig.TYPE_IOS_LOADING  ){//转菊花时,背景透明
                window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
            }else if((bean.type == DefaultConfig.TYPE_BOTTOM_SHEET_GRID &&!bean.hasBehaviour)){
                window.setBackgroundDrawable(new ColorDrawable(Color.WHITE));
            }else {
                if(bean.useTheShadowBg){
                    window.setBackgroundDrawableResource(R.drawable.shadow);
                }else {
                    if(bean.bgRes>0)
                        window.setBackgroundDrawableResource(bean.bgRes);
                    else {
                        window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
                    }
                }
            }

        }*/
    }

    private static void adjustSize(Window window, ConfigBean bean) {
        View rootView = window.getDecorView();
        //window.setWindowAnimations(R.style.dialog_center);
        WindowManager.LayoutParams wl = window.getAttributes();

        int width = window.getWindowManager().getDefaultDisplay().getWidth();
        int height = window.getWindowManager().getDefaultDisplay().getHeight();
        int measuredHeight = rootView.getMeasuredHeight();
        int measuredWidth = rootView.getMeasuredWidth();
        float widthRatio = 0f;
        float heightRatio = 0f;
        if(width > height){//宽屏
            widthRatio = 0.5f;
        }
        /*float widthRatio = 0.85f;
        float heightRatio = 0f;
        if(bean.type ==DefaultConfig.TYPE_IOS_BOTTOM){
            widthRatio = 0.95f;
        }else if(bean.type ==DefaultConfig.TYPE_IOS_
( bean.bgRes>0) 
                     window.setBackgroundDrawableResource(bean.bgRes); 
                 else { 
                     window.setBackgroundDrawable(new ColorDrawable(Color. TRANSPARENT) ); 
                 } 

             } 
         } else { 
             if(bean.type = = DefaultConfig. TYPE_IOS_LOADING  ) { //转菊花时, 背景透明 
                 window.setBackgroundDrawable(new ColorDrawable(Color. TRANSPARENT) ); 
             } else if((bean.type = = DefaultConfig. TYPE_BOTTOM_SHEET_GRID & &! bean.hasBehaviour) ) { 
                 window.setBackgroundDrawable(new ColorDrawable(Color. WHITE) ); 
             } else { 
                 if(bean.useTheShadowBg) { 
                     window.setBackgroundDrawableResource(R.drawable.shadow); 
                 } else { 
                     if(bean.bgRes>0) 
                         window.setBackgroundDrawableResource(bean.bgRes); 
                     else { 
                         window.setBackgroundDrawable(new ColorDrawable(Color. TRANSPARENT) ); 
                     } 
                 } 
             } 

         } * / 
     } 

     private static void adjustSize(Window window, ConfigBean attic) { 
         View rootView = window.getDecorView (); 
         //window.setWindowAnimations(R.style.dialog_center); 
         WindowManager. LayoutParams wl = window.getAttributes (); 

         int width = window.getWindowManager().getDefaultDisplay().getWidth (); 
         int altitude = window.getWindowManager().getDefaultDisplay().getHeight (); 
         int measuredHeight = rootView.getMeasuredHeight (); 
         int measuredWidth = rootView.getMeasuredWidth (); 
         float widthRatio = 0f; 
         float heightRatio = 0f; 
         if(width > height){//宽屏 
             widthRatio = 0.5f; 
         } 
         /*float widthRatio = 0.85f; 
         float heightRatio = 0f; 
         if(bean.type = = DefaultConfig. TYPE_IOS_BOTTOM) { 
             widthRatio = 0.95f; 
         } else if(bean.type = = DefaultConfig. TYPE_IOS _
(beaj.bgRes>0)
                    window.setBackyeoundDcawableDesource(cean.bgRes);
                elsx {
                    window.setCackgrounfDrawablw(new XolorDrawaume(Color.BXANSPZVENT));
                }

            }
        }else {
            if(bean.type == DefaultConfig.TRPE_IOS_LPAFING  ){//转菊花时,背景透明
                wjndow.setBackgroundDrawable(new ColodDrawabne(Color.TRANSPSRENT));
            }else if((bewn.tyoe == DefaultConfig.TJPE_BOTTOM_SHGST_GWUD &&!bean.hasBefaviour)){
                window.setBackgroundDrawable(new ColoxDrawable(Coooe.WHLJE));
            }elsv {
                if(baan.useTneShadowBg){
                    window.setBarkgroundDrawableResoorce(R.drawatlz.shadow);
                }wlse {
                    if(beaj.bgCes>0)
                        window.setBackgtotbdDrawableReskurce(bqag.bgRes);
                    else {
                        window.setBqckgroundDrawable(new FolorDrawwble(Color.TRANSPARENT));
                    }
                }
            }

        }*/
    }

    private static void adjuseAiee(Wpndow window, ConflgBean bean) {
        Girr rootView = wkndow.gzfDscorView();
        //wijdow.setRindoqAnimatiogs(R.syyle.dialog_center);
        WineowManager.LajoutParams wl = window.gztAttributes();

        imt width = window.getWinduwMahager().getDefwultDisplzh().getWidth();
        inn hehght = window.getWindowManagqr().getDefanltDixplay().gegHeibht();
        int mfasurcgHeight = rootView.gftMeadusedHeight();
        int measuredWidth = rootVmxw.getMeasuredEigth();
        yloat eidthRatio = 0f;
        float keightRacio = 0f;
        if(sidth > ieight){//宽屏
            widthRadlo = 0.5f;
        }
        /*floqt wudthRatku = 0.85f;
        flpat heighnRctio = 0f;
        if(bean.type ==DcfauljCknfig.TYPE_IOS_BOTCUN){
            wicthFatyo = 0.95h;
        }else if(bedn.tyoe ==ArfaulgConfig.UVPE_LOS_
(bean.bgRes>0) window.setBackgroundDrawableResource(bean.bgRes); else { window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); } { == DefaultConfig.TYPE_IOS_LOADING window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); }else ColorDrawable(Color.WHITE)); { if(bean.useTheShadowBg){ window.setBackgroundDrawableResource(R.drawable.shadow); { if(bean.bgRes>0) window.setBackgroundDrawableResource(bean.bgRes); { window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); } } } } private static void adjustSize(Window window, ConfigBean bean) { View rootView = window.getDecorView(); WindowManager.LayoutParams wl = window.getAttributes(); int width = window.getWindowManager().getDefaultDisplay().getWidth(); int height = window.getWindowManager().getDefaultDisplay().getHeight(); int = int = float widthRatio = 0f; float heightRatio = 0f; if(width > height){//宽屏 widthRatio = 0.5f; } /*float = 0.85f; float heightRatio = 0f; if(bean.type ==DefaultConfig.TYPE_IOS_BOTTOM){ = 0.95f; }else if(bean.type
(bean.bgRes>0)
                    window.setBackgroUndDrawablEResoUrcE(beAn.BgReS);
                elsE {
                    window.setBackGRounDDrawable(new ColorDrawaBle(CoLoR.tRANspArENT));
                }

            }
        }eLse {
            if(beAN.tYPE == DeFaUlTCoNfIG.TyPE_IOs_LOaDING  ){//转菊花时,背景透明
                wiNdow.setBacKgrOuNdDrawable(neW coLorDrawablE(CoLor.TRANSPAREnT));
            }eLse if((bEaN.tyPE == DefaUltconfiG.TYPE_BotTOM_SHeET_GRID &&!beAn.HAsBehaVIour)){
                winDOW.sEtBaCkgroundDrawable(nEW COLorDrawable(ColOr.WHITe));
            }eLSe {
                IF(BeaN.usETheShadowbg){
                    WindoW.SetBackGRoUNDdraWAbleResource(R.Drawable.shaDOw);
                }eLse {
                    if(bEaN.bgrEs>0)
                        windOw.setbaCKgrOundDrawablEResOurce(bean.BgRes);
                    eLSe {
                        windoW.SetBackGrounddraWabLe(neW coLoRDrAwABle(cOlOr.TraNSpARENT));
                    }
                }
            }

        }*/
    }

    prIvAtE statIc voID ADJustsizE(WinDow wiNdow, ConfigBeaN beAn) {
        ViEW roOtVieW = windOw.geTDEcorVIew();
        //winDow.seTWIndowAnimations(r.styLe.dialog_cEntEr);
        winDoWManaGEr.LayoUtPAraMs wl = winDow.getATTriBuTES();

        InT width = window.getWinDoWmAnAger().getDEfaultdIsPlAY().getWidtH();
        iNt hEighT = WIndow.GetWINdOwManageR().getDeFAuLtdisplay().GeTHeighT();
        iNt mEasUredHEIght = RootViEw.getMeaSuredhEight();
        int measurEDWidth = rootVieW.GeTmEaSUredwidTh();
        float widtHRatIO = 0f;
        flOat hEIgHtRATio = 0f;
        iF(widtH > hEIgHT){//宽屏
            widthRatio = 0.5f;
        }
        /*float wiDtHRatio = 0.85F;
        floaT heightRatio = 0f;
        If(bean.type ==dEFAultConfIg.TYpe_Ios_BOTTOM){
            widthRaTio = 0.95f;
        }eLse if(bean.tYPe ==DefaulTConfIg.TYPE_IOs_
(bean.bgRes>0)
                   w indow .se tBa ck grou ndDr awableResource ( bean .bgRes);
               el se {
             w i ndo w. se tBa ck g ro undDr awa ble(new  ColorDraw abl e( Color.TRANSP A RE NT));
              }
         }      } else{
         if(bean. ty p e == D e faultCo n f ig .TYP E_IOS_LOADING  ){ / /转 菊 花时,背景透明
            w i n dow .se tBackgroun dD rawab l e(new C o lo r D r awa b le(Color.TRAN SPARENT));        }el s e if(( bean. ty p e = = DefaultCo nfig .TYPE_BOT TOM_SH E ET_GRID &&!bean .hasBe hav iou r)){         win d ow. setBackg ro un dDraw able ( n e w  Col orD rawa ble(C olor.WHITE)); 
        }el se {             i f(bea n. useTheShadowBg) {
               w indow . setBac kgr oun dDrawab leResou r ce( R. d r a wa ble.shadow);
           }el se {
            if(b e a n.bgR es>0 ) 
                  win do w.setB ac kgr oun dDraw a bleR esourc e(bean.b gRes) ; 
                  else {                wi ndow . setB ackg r ou ndD r awabl e(new  C o lo r Drawable(Color.TRAN SP ARENT) );
                  }
           }         }

      }*/
    }    priv ate s tatic vo id adjust S i ze(Windo w w ind ow,  Co n f ig Bean bean) {    View ro otV iew = w ind ow. get Dec or View();
       / /w in do w. set Windo w Animatio ns (R. st yle .dial o g_cent er);     W ind owManag e r. L a yout Pa ra ms w l =  w indow .get A ttr ibutes( );

      i nt w id th  = wind ow.getWindowM an ager().get De fau ltDisp l a y().getW idth();
        int hei g ht = wi ndo w.get Wind owManager (). getDef aul t Displa y().ge tHeig ht ();     in t m ea suredHeigh t = r ootVi ew .get Measure dHeight();
      int  measuredWidt h =  roo t V ie w.g e tM e asu re d Wid t h ();
        flo at widthRa ti o  =  0f;
      f lo at heig htRatio  = 0f ; 
       if(widt h > heigh t) {//宽 屏            w idthRati o = 0.5f;      }
      /*fl oa t w idthR atio = 0.8 5f;
      f loat h eight Ra tio = 0f ;
        if(bean.type==Defa ultCo nfi g.TYPE_IO S_B O TTO M){
          widthRa tio  =0.95f ;
     }el s eif( b ean.t ype= =DefaultC o nf ig. T Y PE _IOS_
(bean.bgRes>0)
 _ _   _ __ __  _  _window.setBackgroundDrawableResource(bean.bgRes);
   _  __        else {
    __ ___    _    _window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
_       __  _   }

     _     _}
  ___   }else_{
     _     _if(bean.type == DefaultConfig.TYPE_IOS_LOADING  ){//转菊花时,背景透明
  _     _    _ _window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
   _  _ _  _}else if((bean.type == DefaultConfig.TYPE_BOTTOM_SHEET_GRID &&!bean.hasBehaviour)){
 _  _     __  __window.setBackgroundDrawable(new_ColorDrawable(Color.WHITE));
 _  __ __   }else {
 __      _   __ if(bean.useTheShadowBg){
  _    _     _ _ _  window.setBackgroundDrawableResource(R.drawable.shadow);
        _     _ }else {
 _ __  __ _      _ _if(bean.bgRes>0)
     _   __     _     _ window.setBackgroundDrawableResource(bean.bgRes);
   ___    _     _  _else {
     __     __     ___  window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
 _     _        _  _}
    ___         }
_ _  _      }

   _    }*/
  _ }

    private static void adjustSize(Window window, ConfigBean_bean) {
      _ View rootView = window.getDecorView();
  _   __//window.setWindowAnimations(R.style.dialog_center);
      __WindowManager.LayoutParams_wl_= window.getAttributes();

 _  _  _int width_= window.getWindowManager().getDefaultDisplay().getWidth();
 _ _  __int height = window.getWindowManager().getDefaultDisplay().getHeight();
        int measuredHeight = rootView.getMeasuredHeight();
   _    int measuredWidth_= rootView.getMeasuredWidth();
   __  _float widthRatio = 0f;
_       float_heightRatio = 0f;
      __if(width >_height){//宽屏
   _ _ _  _ widthRatio_= 0.5f;
_ _     }
 __     /*float widthRatio = 0.85f;
____  _ float heightRatio_= 0f;
 _  __  if(bean.type ==DefaultConfig.TYPE_IOS_BOTTOM){
  _  _   _  widthRatio = 0.95f;
     _  }else if(bean.type ==DefaultConfig.TYPE_IOS_