Giter Site home page Giter Site logo

seekbarwithinstruct's Introduction

seekbarwithinstruct

关于一个带指示器的seekbar,初次自定义view很多地方不足;

联系方式 邮箱地址: [email protected] QQ: 1320917731 个人能力也有限,希望一起学习一起进步。

演示 image

1.用法

Android studio在gradle可以选择添加或者copy源码(Api>15):

compile 'com.tikou:seekbarwithinstruct:1.0.0'

引入布局

<com.tikou.mylibrary.UiSeeKBar
    android:id="@+id/ui_seekbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:progressDrawable="@drawable/seek"
    android:maxHeight="20px"
    android:thumb="@drawable/seek_instrucrt"
    custom:numbackground="@mipmap/qqshow"
    custom:numType="top"
    custom:numTextColor="#FFFFFF"
    custom:numScale="0.16"
    android:splitTrack="false"
    custom:numTextFormat="元"
    />

 <com.tikou.mylibrary.UiSeeKBar
    android:id="@+id/ui_seekbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:progressDrawable="@drawable/seek"
    android:maxHeight="20px"
    android:thumb="@drawable/seek_instrucrt"
    custom:numbackground="@mipmap/qqshow"
    custom:numType="top"
    custom:numTextColor="#FFFFFF"
    custom:numScale="0.16"
    android:splitTrack="false"
    custom:numTextFormat="元"
    />

2.使用方式参数说明

目前thum高度必须大于progressdrawble 高度

Attributes

name format description
numbackground reference 设置指示器背景的资源文件
numTextSize dimension 设置指示器内部文字的大小
numTextColor color 设置指示器内部文字的颜色
numScale string 设置指示器背景资源文件的箭头和整个图片高的的比例如0.2
numType enum 设置指示器在seekbar的上面还是下面
numTextFormat string 设置指示器内部文字的后缀格式,默认是%,如20%,输入"元",就是20元

seekbarwithinstruct's People

Contributors

tiannuo avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.