Commit b059f7bb by 霍志良

feat:价格筛选刻度重写

parent ae1127f3
......@@ -436,11 +436,15 @@ public class RangeSeekBar extends View {
}
//draw steps
//绘制刻度线
protected void onDrawSteps(Canvas canvas, Paint paint) {
if (!verifyStepsMode()) return;
int stepMarks = getProgressWidth() / (steps);
float extHeight = (stepsHeight - getProgressHeight()) / 2f;
//绘制刻度。其他场景要用,需要自己修改这部分代码
for (int k = 1; k <= steps - 1; k++) {
//如果是奇数Setp,则不绘制刻度
if (k % 2 == 1) continue;
float x = getProgressLeft() + k * stepMarks - stepsWidth / 2f;
stepDivRect.set(x, getProgressTop() + stepsHeight, x + stepsWidth, getProgressBottom() + 3 * stepsHeight);
if (stepsBitmaps.isEmpty() || stepsBitmaps.size() <= k) {
......
......@@ -38,11 +38,11 @@
app:rsb_gravity="bottom"
app:rsb_mode="range"
app:rsb_progress_color="@color/platform_main_theme"
app:rsb_step_auto_bonding="false"
app:rsb_step_auto_bonding="true"
app:rsb_step_color="@color/platform_gray7"
app:rsb_step_height="5dp"
app:rsb_step_width="1dp"
app:rsb_steps="6"
app:rsb_steps="12"
app:rsb_thumb_drawable="@drawable/thumb_yellow_stroke"
app:rsb_thumb_height="15dp"
app:rsb_thumb_width="15dp"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment