Page 1208 - 3-3
P. 1208

if(lParams.mScale_TextSize != -1) {
                                  if(lView instanceof TextView) {
                                      TextView v = (TextView) lView;
                                      if(isDifferentSufficiently(lParams.mScale_TextSize  *  lScale_Ratio_Post,
          v.getTextSize())) {
                                          v . s e t T e x t S i z e ( T y p e d V a l u e . C O M P L E X _ U N I T _ P X ,
          lParams.mScale_TextSize * lScale_Ratio_Post);
                                      }
                                  }
                              }


                              if(dif) {
                                  lView.setLayoutParams(lParams);
                              }
                          }
                      }
                      if(isDifferentSufficiently(lScale_Ratio_Post, lScale_Ratio_Pre, 1.01f) == false) {
                          break;
                      }
                  }


          //              log("onMeasure ================ End         "+this.toString());
                  super.onMeasure(MeasureSpec.makeMeasureSpec(Math.round(lRoot_Width),
          lRoot_MeasureSpec_WidthMode),             MeasureSpec.makeMeasureSpec(Math.round(lRoot_Height),
          lRoot_MeasureSpec_HeightMode));
                  setMeasuredDimension(Math.round(lRoot_Width), Math.round(lRoot_Height));
              }


              private boolean isDifferentSufficiently(float pNew, float pOld) {
                  return isDifferentSufficiently(pNew, pOld, 1.1f);
              }
              private boolean isDifferentSufficiently(float pNew, float pOld, float pDiffDelta) {
                  if( pNew < pOld / pDiffDelta || pOld * pDiffDelta < pNew ) {
                      return true;
                  }
                  return false;
              }


              private enum ViewPosition {
                  Top,
                  Bottom,
                  Left,
                  Right,
                  Surrounded,
                  Nothing


                                                        - 1208 -
   1203   1204   1205   1206   1207   1208   1209   1210   1211   1212   1213