Skip to content

Instantly share code, notes, and snippets.

@krugloid
Created April 27, 2020 07:27
Show Gist options
  • Save krugloid/1cbdc9b1d6945cd40958f016d1f4708b to your computer and use it in GitHub Desktop.
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
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