-
Notifications
You must be signed in to change notification settings - Fork 3
CustomSeekBar
DV Infosys edited this page Jun 21, 2019
·
1 revision
This is a CustomSeekBar library on android
<com.dvinfosys.widgets.SeekBar.CustomSeekBar
android:id="@+id/sb_speed"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:visibility="visible"
app:sb_indicator_color="@color/color_gray"
app:sb_indicator_text_color="@color/defualt_black"
app:sb_indicator_text_size="18sp"
app:sb_max="3"
app:sb_min="-3"
app:sb_only_thumb_draggable="false"
app:sb_progress="0"
app:sb_seek_smoothly="true"
app:sb_show_indicator="rounded_rectangle"
app:sb_show_tick_marks_type="none"
app:sb_show_tick_texts="true"
app:sb_thumb_color="@color/defualt_black"
app:sb_thumb_size="15dp"
app:sb_tick_marks_color="@color/color_select_thumb"
app:sb_tick_marks_size="13dp"
app:sb_tick_texts_color="@color/defualt_black"
app:sb_tick_texts_size="15sp"
app:sb_ticks_count="6"
app:sb_track_background_color="@color/color_gray"
app:sb_track_background_size="2dp"
app:sb_track_progress_color="@color/color_select_thumb"
app:sb_track_progress_size="4dp" />
seekBar.setOnSeekChangeListener(new OnSeekChangeListener() {
@Override
public void onSeeking(SeekParams seekParams) {
Log.i(TAG, seekParams.seekBar);
Log.i(TAG, seekParams.progress);
Log.i(TAG, seekParams.progressFloat);
Log.i(TAG, seekParams.fromUser);
//when tick count > 0
Log.i(TAG, seekParams.thumbPosition);
Log.i(TAG, seekParams.tickText);
}
@Override
public void onStartTrackingTouch(IndicatorSeekBar seekBar) {
}
@Override
public void onStopTrackingTouch(IndicatorSeekBar seekBar) {
}
});
Copyright (C) 2019 DV Infosys
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.