简体   繁体   English

使用Yahoo库为RangeSeekBar在Android中设置拇指和进度对话框的颜色

[英]Setting the Thumb and progress dialog color in Android using Yahoo library for RangeSeekBar

I am not able to provide color of my choice to Thumb and progress dialog using "com.yahoo.mobile.client.android.util.rangeseekbar:rangeseekbar-library:0.1.0" library. 我无法使用“ com.yahoo.mobile.client.android.util.rangeseekbar:rangeseekbar-library:0.1.0”库为“拇指和进度”对话框提供选择的颜色。

Below are the ways which I have tried: 以下是我尝试过的方法:

  1. rangeseekBar.setDrawingCacheBackgroundColor(Color.BLACK); rangeseekBar.setDrawingCacheBackgroundColor(Color.BLACK);
  2. rangeseekBar.setColorFilter(Color.YELLOW, PorterDuff.Mode.MULTIPLY); rangeeekBar.setColorFilter(Color.YELLOW,PorterDuff.Mode.MULTIPLY);
  3. rangeseekBar.setAccessibilityLiveRegion(Color.RED); rangeseekBar.setAccessibilityLiveRegion(Color.RED);
  4. rangeseekBar.setColorFilter(Color.RED); rangeseekBar.setColorFilter(Color.RED);

But no luck. 但是没有运气。 Anyone please help me on this. 有人请帮我。

In library SeekBar color define as 在库中SeekBar 颜色定义为

public static final int DEFAULT_COLOR = Color.argb(0xFF, 0x33, 0xB5, 0xE5);

so use 所以用

  RangeSeekBar.DEFAULT_COLOR = Color.argb(0xFF, 0x33, 0xB5, 0xE5);// change your custom color value.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM