GithubHelp home page GithubHelp logo

android-better-time-picker's Introduction

About

TimePicker DialogFragment modeled after the 4.2 Alarm Clock TimePicker to improve UX for picking time

Changelog:

1.1

  • Fix for the bold text overflow on Android 4.3 and 4.4
  • Updated the compatibility library to the latest one at the moment

1.0

Including in Your Project

Android better time picker is an Android library project.

You can include this project by referencing it as a library project in Eclipse or ant.

If you are a Maven user you can easily include the library by specifying it as a dependency:

<dependency>
  <groupId>com.doomonafireball.betterpickers</groupId>
  <artifactId>library</artifactId>
  <version>1.2.0</version>
  <type>apklib</type>
</dependency>

Dependencies

You will need these fonts Roboto-Bold.ttf AndroidClockMono-Thin.ttf

These can be fount in you android SDK folder or in the assets/fonts folder

Usage

For a working implementation of this project see the sample/ folder.

  1. Include the Android clock fonts in your assets/fonts/ folder (create the folder if it doesn't already exist. You can find these fonts in the assets/fonts/ folder in this library or in your android SDK installation.

    Roboto-Bold.ttf AndroidClockMono-Thin.ttf

  2. Implement the appropriate Handler callbacks: Implement the TimePickerDialogHandler for any class that you want to be notified when the time is set

  3. Use one of the Builder classes to create a PickerDialog with a theme:

    TimeickerBuilder btp = new TimeickerBuilder() .setFragmentManager(getSupportFragmentManager()) .setStyleResId(R.style.BetterPickersDialogFragment); btp.addTimeSetListener(this); //add here any listener implementing TimePickerDialogHandler btp.show();

Theming

Please see the original better android pickers documentation for theming capabilities

Contribution

Feel free to contribute to BetterPickers.

Credits

Thanks to Derek Brameyer for his work on Android Better Pickers.

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

android-better-time-picker's People

Contributors

inteist avatar

Watchers

 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.