List of usage examples for android.widget ProgressBar ProgressBar
public ProgressBar(Context context, AttributeSet attrs)
From source file:org.spinsuite.util.SFAAsyncTask.java
/** * Create Progress Bar // w ww.j a va 2s . c o m * @author <a href="mailto:carlosaparadam@gmail.com">Carlos Parada</a> 05/03/2014, 23:05:20 * @param p_attrs * @return void */ public void createProgressBar(AttributeSet p_attrs) { if (m_ProgressBar == null) m_ProgressBar = new ProgressBar(m_ctx, p_attrs); }
From source file:com.bitants.wally.views.swipeclearlayout.SwipeClearLayout.java
/** * Constructor that is called when inflating SwipeRefreshLayout from XML. * @param context/*from w w w . j a v a2 s.com*/ * @param attrs */ public SwipeClearLayout(Context context, AttributeSet attrs) { super(context, attrs); touchSlop = ViewConfiguration.get(context).getScaledTouchSlop(); mediumAnimationDuration = getResources().getInteger(android.R.integer.config_mediumAnimTime); setWillNotDraw(false); final DisplayMetrics metrics = getResources().getDisplayMetrics(); circle = generateCircle(context, attrs, metrics); progressBar = new ProgressBar(context, attrs); decelerateInterpolator = new DecelerateInterpolator(DECELERATE_INTERPOLATION_FACTOR); accelerateInterpolator = new AccelerateInterpolator(ACCELERATE_INTERPOLATION_FACTOR); final TypedArray a = context.obtainStyledAttributes(attrs, LAYOUT_ATTRS); setEnabled(a.getBoolean(0, true)); initAttrs(context, attrs); a.recycle(); }