Coder Social home page Coder Social logo

scrollhmspicker's Introduction

Android Arsenal Newest version

ScrollHmsPicker

A simple HMS time picker with scrolling.

Screenshots

In the XML In the Dialog
In the XML In the Dialog

Install

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Step 2. Add the dependency => Newest version

dependencies {
    implementation 'com.github.DeweyReed:ScrollHmsPicker:$version'
}

2.X.X requires AndroidX. 1.0.3 is the last version using the support library.

Usage

<io.github.deweyreed.scrollhmspicker.ScrollHmsPicker
    android:id="@+id/scrollHmsPicker"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />

Then, use scrollHmsPicker.getHours() and other getters to get users' input.

Attributes

attribute xml default means
setHours shp_hours 0(Int) set picker's hours
setMinutes shp_minutes 0(Int) set picker's minutes
setSeconds shp_seconds 0(Int) set picker's seconds
setColorNormal shp_normal_color android.R.color.darker_gray(color resource) set picker's not selected text color
setColorIntNormal shp_normal_color - accepts a color int
setColorSelected shp_selected_color android.R.color.holo_red_light(color resource) set picker's selected text color
setColorIntSelected shp_selected_color - accepts a color int
setAutoStep shp_auto_step false(Boolean) let picker automatically increment 1 minute if seconds move from 59 to 00 or increment 1 hour if minutes move from 59 to 00
setHoursVisibility shp_show_hours true set hours picker visibility
setMinutesVisibility shp_show_minutes true set minutes picker visibility
setSecondsVisibility shp_show_seconds true set seconds picker visibility
set99Hours shp_enable_99_hours false Change max hours from 23 to 99
setTypeface Set all texts typeface
getTypeface Get current text typeface

License

MIT License

scrollhmspicker's People

Contributors

deweyreed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

scrollhmspicker's Issues

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.