1 Star 0 Fork 6

Modificator / IndicatorBar

forked from Bvin / IndicatorBar 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

IndicatorBar

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配置,在下图中就是亮色的数字

第一页

空文件

简介

SeekBar的简单实现,Thumb移动的距离是固定,原始SeekBar为了让让Thumb站的下会修剪Thumb移动的距离。 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/modificator/IndicatorBar.git
git@gitee.com:modificator/IndicatorBar.git
modificator
IndicatorBar
IndicatorBar
master

搜索帮助