Source:
<code>private void addRange() { if (mHandler == null) { mHandler = new Handler(); } final boolean isSeekBar = FORMAT_ACTION.equals(mRangeItem.getFormat()); final ProgressBar progressBar = isSeekBar ? <START> new SeekBar(getContext()) <END> : new ProgressBar(getContext(), null, android.R.attr.progressBarStyleHorizontal); Drawable progressDrawable = DrawableCompat.wrap(progressBar.getProgressDrawable()); if (mTintColor != -1 && progressDrawable != null) { DrawableCompat.setTint(progressDrawable, mTintColor); progressBar.setProgressDrawable(progressDrawable); } progressBar.setMax(mRangeMaxValue - mRangeMinValue); progressBar.setProgress(mRangeValue); progressBar.setVisibility(View.VISIBLE); if (mStartItem == null) { addView(progressBar); } else { LayoutParams lp = new LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); lp.setMargins(0, dpToPixel(SEEKBAR_MARGIN_TOP), 0, 0); progressBar.setPadding(dpToPixel(SEEKBAR_PADDING_LEFT), progressBar.getPaddingTop(), progressBar.getPaddingRight(), progressBar.getPaddingBottom()); mSubContent.addView(progressBar, 0, lp); } mRangeBar = progressBar; if (isSeekBar) { SliceItem thumb = mRowContent.getInputRangeThumb(); SeekBar seekBar = (SeekBar) mRangeBar; if (thumb != null && thumb.getIcon() != null) { Drawable d = thumb.getIcon().loadDrawable(getContext()); if (d != null) { seekBar.setThumb(d); } } Drawable thumbDrawable = DrawableCompat.wrap(seekBar.getThumb()); if (mTintColor != -1 && thumbDrawable != null) { DrawableCompat.setTint(thumbDrawable, mTintColor); seekBar.setThumb(thumbDrawable); } seekBar.setOnSeekBarChangeListener(mSeekBarChangeListener); } }</code><technical_language>P.S. final boolean renderInNewLine = mStartItem == null;</technical_language>

Target:
private void addRange() { if (mHandler == null) { mHandler = new Handler(); } final boolean isSeekBar = FORMAT_ACTION.equals(mRangeItem.getFormat()); final boolean renderInNewLine = mStartItem == null; final ProgressBar progressBar = isSeekBar ? (renderInNewLine ? new SeekBar(getContext()) : (SeekBar) LayoutInflater.from(getContext()).inflate(R.layout.abc_slice_seekbar_view, this, false)) : new ProgressBar(getContext(), null, android.R.attr.progressBarStyleHorizontal); Drawable progressDrawable = DrawableCompat.wrap(progressBar.getProgressDrawable()); if (mTintColor != -1 && progressDrawable != null) { DrawableCompat.setTint(progressDrawable, mTintColor); progressBar.setProgressDrawable(progressDrawable); } progressBar.setMax(mRangeMaxValue - mRangeMinValue); progressBar.setProgress(mRangeValue); progressBar.setVisibility(View.VISIBLE); if (mStartItem == null) { addView(progressBar); } else { mSubContent.setVisibility(GONE); mContent.addView(progressBar, 1); } mRangeBar = progressBar; if (isSeekBar) { SliceItem thumb = mRowContent.getInputRangeThumb(); SeekBar seekBar = (SeekBar) mRangeBar; if (thumb != null && thumb.getIcon() != null) { Drawable d = thumb.getIcon().loadDrawable(getContext()); if (d != null) { seekBar.setThumb(d); } } Drawable thumbDrawable = DrawableCompat.wrap(seekBar.getThumb()); if (mTintColor != -1 && thumbDrawable != null) { DrawableCompat.setTint(thumbDrawable, mTintColor); seekBar.setThumb(thumbDrawable); } seekBar.setOnSeekBarChangeListener(mSeekBarChangeListener); } }