AppCompatSeekBar.java 2.54 KB
package android.support.v7.widget;

import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.support.annotation.RequiresApi;
import android.support.v7.appcompat.R.attr;
import android.util.AttributeSet;
import android.widget.SeekBar;
import gg;

public class AppCompatSeekBar
  extends SeekBar
{
  private gg a = new gg(this);
  
  public AppCompatSeekBar(Context paramContext)
  {
    this(paramContext, null);
  }
  
  public AppCompatSeekBar(Context paramContext, AttributeSet paramAttributeSet)
  {
    this(paramContext, paramAttributeSet, R.attr.seekBarStyle);
  }
  
  public AppCompatSeekBar(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
  {
    super(paramContext, paramAttributeSet, paramInt);
    this.a.a(paramAttributeSet, paramInt);
  }
  
  protected void drawableStateChanged()
  {
    super.drawableStateChanged();
    gg localgg = this.a;
    Drawable localDrawable = localgg.c;
    if ((localDrawable != null) && (localDrawable.isStateful()) && (localDrawable.setState(localgg.b.getDrawableState()))) {
      localgg.b.invalidateDrawable(localDrawable);
    }
  }
  
  @TargetApi(11)
  @RequiresApi(11)
  public void jumpDrawablesToCurrentState()
  {
    super.jumpDrawablesToCurrentState();
    gg localgg = this.a;
    if (localgg.c != null) {
      localgg.c.jumpToCurrentState();
    }
  }
  
  protected void onDraw(Canvas paramCanvas)
  {
    int j = 1;
    super.onDraw(paramCanvas);
    gg localgg = this.a;
    if (localgg.c != null)
    {
      int k = localgg.b.getMax();
      if (k > 1)
      {
        int i = localgg.c.getIntrinsicWidth();
        int m = localgg.c.getIntrinsicHeight();
        if (i >= 0) {
          i /= 2;
        }
        for (;;)
        {
          if (m >= 0) {
            j = m / 2;
          }
          localgg.c.setBounds(-i, -j, i, j);
          float f = (localgg.b.getWidth() - localgg.b.getPaddingLeft() - localgg.b.getPaddingRight()) / k;
          j = paramCanvas.save();
          paramCanvas.translate(localgg.b.getPaddingLeft(), localgg.b.getHeight() / 2);
          i = 0;
          while (i <= k)
          {
            localgg.c.draw(paramCanvas);
            paramCanvas.translate(f, 0.0F);
            i += 1;
          }
          i = 1;
        }
        paramCanvas.restoreToCount(j);
      }
    }
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/android/support/v7/widget/AppCompatSeekBar.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */