Пример #1
0
 @Override
 protected void onSizeChanged(int w, int h, int oldw, int oldh) {
   super.onSizeChanged(w, h, oldw, oldh);
   getAnimationProvider().terminate();
   if (myScreenIsTouched) {
     final ZLView view = ZLApplication.Instance().getCurrentView();
     myScreenIsTouched = false;
     view.onScrollingFinished(ZLView.PageIndex.current);
   }
 }
Пример #2
0
  @Override
  protected void onSizeChanged(int w, int h, int oldw, int oldh) {
    super.onSizeChanged(w, h, oldw, oldh);

    float xpad = (float) (getPaddingLeft() + getPaddingRight());
    float ypad = (float) (getPaddingTop() + getPaddingBottom());

    float ww = (float) w - xpad - axisYSpacing;
    float hh = (float) h - ypad - axisXSpacing;

    // Figure out how big we can make the pie.
    mPlotBounds = new RectF(0f, 0f, ww, hh);
    mPlotBounds.offsetTo(getPaddingLeft() + axisYSpacing, getPaddingTop());

    onDataChanged();
  }