Пример #1
0
  @Override
  protected synchronized void onSizeChanged(int w, int h, int oldw, int oldh) {

    // update pixel conversion values
    PixelUtils.init(getContext());

    // disable hardware acceleration if it's not explicitly supported
    // by the current Plot implementation. this check only applies to
    // honeycomb and later environments.
    if (Build.VERSION.SDK_INT >= 11) {
      if (!isHwAccelerationSupported() && isHardwareAccelerated()) {
        setLayerType(View.LAYER_TYPE_SOFTWARE, null);
      }
    }

    // pingPong is only used in background rendering mode.
    if (renderMode == RenderMode.USE_BACKGROUND_THREAD) {
      pingPong.resize(h, w);
    }

    RectF cRect = new RectF(0, 0, w, h);
    RectF mRect = boxModel.getMarginatedRect(cRect);
    RectF pRect = boxModel.getPaddedRect(mRect);

    layout(new DisplayDimensions(cRect, mRect, pRect));
    super.onSizeChanged(w, h, oldw, oldh);
    if (renderThread != null && !renderThread.isAlive()) {
      renderThread.start();
    }
  }
Пример #2
0
 @Override
 public void setMargins(float left, float top, float right, float bottom) {
   boxModel.setMargins(left, top, right, bottom);
 }
Пример #3
0
 public float getPlotPaddingRight() {
   return boxModel.getPaddingRight();
 }
Пример #4
0
 public void setPlotPaddingBottom(float plotPaddingBottom) {
   boxModel.setPaddingBottom(plotPaddingBottom);
 }
Пример #5
0
 public void setPlotPaddingTop(float plotPaddingTop) {
   boxModel.setPaddingTop(plotPaddingTop);
 }
Пример #6
0
 public void setPlotMarginRight(float plotMarginRight) {
   boxModel.setMarginRight(plotMarginRight);
 }
Пример #7
0
 public void setPlotMarginLeft(float plotMarginLeft) {
   boxModel.setMarginLeft(plotMarginLeft);
 }
Пример #8
0
 public float getPlotMarginBottom() {
   return boxModel.getMarginBottom();
 }
Пример #9
0
 @Override
 public float getPaddingRight() {
   return boxModel.getPaddingRight();
 }
Пример #10
0
 @Override
 public void setPaddingTop(float paddingTop) {
   boxModel.setPaddingTop(paddingTop);
 }
Пример #11
0
 @Override
 public void setPaddingLeft(float paddingLeft) {
   boxModel.setPaddingLeft(paddingLeft);
 }
Пример #12
0
 @Override
 public float getMarginBottom() {
   return boxModel.getMarginBottom();
 }
Пример #13
0
 @Override
 public void setMarginTop(float marginTop) {
   boxModel.setMarginTop(marginTop);
 }
Пример #14
0
 @Override
 public float getMarginTop() {
   return boxModel.getMarginTop();
 }
Пример #15
0
 @Override
 public void setPadding(float left, float top, float right, float bottom) {
   boxModel.setPadding(left, top, right, bottom);
 }
Пример #16
0
 public float getPlotMarginTop() {
   return boxModel.getMarginTop();
 }
Пример #17
0
 public void setPlotMarginTop(float plotMarginTop) {
   boxModel.setMarginTop(plotMarginTop);
 }
Пример #18
0
 @Override
 public void setPaddingRight(float paddingRight) {
   boxModel.setPaddingRight(paddingRight);
 }
Пример #19
0
 public void setPlotMarginBottom(float plotMarginBottom) {
   boxModel.setMarginBottom(plotMarginBottom);
 }
Пример #20
0
 @Override
 public float getPaddingBottom() {
   return boxModel.getPaddingBottom();
 }
Пример #21
0
 public float getPlotMarginRight() {
   return boxModel.getMarginRight();
 }
Пример #22
0
 @Override
 public void setPaddingBottom(float paddingBottom) {
   boxModel.setPaddingBottom(paddingBottom);
 }
Пример #23
0
 public float getPlotPaddingTop() {
   return boxModel.getPaddingTop();
 }
Пример #24
0
 @Override
 @SuppressWarnings("SameParameterValue")
 public void setMarginBottom(float marginBottom) {
   boxModel.setMarginBottom(marginBottom);
 }
Пример #25
0
 public float getPlotPaddingBottom() {
   return boxModel.getPaddingBottom();
 }
Пример #26
0
 @Override
 public void setMarginLeft(float marginLeft) {
   boxModel.setMarginLeft(marginLeft);
 }
Пример #27
0
 public void setPlotPaddingLeft(float plotPaddingLeft) {
   boxModel.setPaddingLeft(plotPaddingLeft);
 }
Пример #28
0
 @Override
 public float getMarginRight() {
   return boxModel.getMarginRight();
 }
Пример #29
0
 public void setPlotPaddingRight(float plotPaddingRight) {
   boxModel.setPaddingRight(plotPaddingRight);
 }
Пример #30
0
 @Override
 public void setMarginRight(float marginRight) {
   boxModel.setMarginRight(marginRight);
 }