示例#1
0
  @SuppressWarnings("deprecation")
  protected void placeArrow() {
    float y = sizeUiPx - (hue * sizeUiPx / 360.f);
    if (y == sizeUiPx) y = 0.f;

    AbsoluteLayout.LayoutParams layoutParams =
        (AbsoluteLayout.LayoutParams) arrow.getLayoutParams();
    layoutParams.y = (int) (y + 4);
    arrow.setLayoutParams(layoutParams);
  }
示例#2
0
  @SuppressWarnings("deprecation")
  protected void placeSpyglass() {
    float x = sat * sizeUiPx;
    float y = (1.f - val) * sizeUiPx;

    AbsoluteLayout.LayoutParams layoutParams =
        (AbsoluteLayout.LayoutParams) viewSpyglass.getLayoutParams();
    layoutParams.x = (int) (x + 3);
    layoutParams.y = (int) (y + 3);
    viewSpyglass.setLayoutParams(layoutParams);
  }