代码拉取完成,页面将自动刷新
同步操作将从 Bvin/IndicatorBar 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
SeekBar的简单实现,Thumb移动的距离是固定,原始SeekBar为了让让Thumb站的下会修剪Thumb移动的距离。
<declare-styleable name="IndicatorBar">
<attr name="trackThickness" format="dimension"/> //track的厚度
<attr name="themeColor" format="reference|color"/> //主题颜色
<attr name="highlightColor" format="reference|color"/> //高亮颜色
<attr name="thumb" format="reference" /> //滑块图片
<attr name="highlightThumb" format="reference" /> //高亮滑块图片
<attr name="textSize" format="dimension" /> //字体大小
<attr name="highlightTextSize" format="dimension" /> //高亮字体的大小
<attr name="currentPosition" format="integer" /> //当前选中的position
<attr name="maxPosition" format="integer" /> //最大值
<attr name="indicatorOffset" format="integer" /> //indicator偏移
<attr name="lowlightSelectedText" format="string" /> //普通说明文字
<attr name="maxHighlightSelectedText" format="string" /> //高亮最大值说明文字
<attr name="showTicks" format="boolean" />
</declare-styleable>
以上对应的都有对应的java方法设置..
final IndicatorBar ib = (IndicatorBar) findViewById(R.id.indicatorBar1);
ib.setOnIndicatorChangeListener(new OnIndicatorChangeListener() {
@Override
public void onIndicatorChanged(IndicatorBar indicatorBar, int position, float xAtPosition) {
Log.i("position"+position, "xAtPosition"+xAtPosition);
}
});
ib.setHightlightIndicators(new int[]{3,4,5});//高亮indicator配置,在下图中就是亮色的数字
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。