Created
April 27, 2020 07:27
-
-
Save krugloid/1cbdc9b1d6945cd40958f016d1f4708b to your computer and use it in GitHub Desktop.
androidx-master-dev/frameworks/support/slices/view/src/main/java/slice/widget/RowView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void addRange() { | |
if (mHandler == null) { | |
mHandler = new Handler(); | |
} | |
SliceItem style = SliceQuery.findSubtype(mRangeItem, FORMAT_INT, SUBTYPE_RANGE_MODE); | |
final boolean isIndeterminate = style != null && style.getInt() == INDETERMINATE_RANGE; | |
final boolean isSeekBar = FORMAT_ACTION.equals(mRangeItem.getFormat()); | |
final boolean renderInNewLine = mStartItem == null; | |
final ProgressBar progressBar; | |
if (isSeekBar) { | |
android.util.Log.d("ROWVIEW", "Build custom SeekBar."); | |
//if (renderInNewLine) { | |
//progressBar = new SeekBar(getContext()); | |
//} else { | |
progressBar = (SeekBar) LayoutInflater.from(getContext()).inflate( | |
R.layout.abc_slice_seekbar_view, this, false); | |
//} | |
} else { | |
if (renderInNewLine) { | |
progressBar = new ProgressBar(getContext(), null, | |
android.R.attr.progressBarStyleHorizontal); | |
} else { | |
progressBar = (ProgressBar) LayoutInflater.from(getContext()).inflate( | |
R.layout.abc_slice_progress_inline_view, this, false); | |
} | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment