TimePicker

Additional

Language
Java
Version
N/A
Created
Feb 26, 2015
Updated
Nov 27, 2017 (Retired)
Owner
ERZ (erz05)
Contributors
ERZ (erz05)
Edgar Ramirez (eramirez01)
2
Activity
Badge
Generate
Download
Source code

Advertisement

(Deprecated) TimePicker

Android Library for TimePicker View

Images of Sample App

Usage

Gradle Import: jcenter
```groovy dependencies { compile 'com.github.erz05:TimePicker:0.1.5@aar' } ```
<com.erz.timepicker_library.TimePicker
    android:id="@+id/timePicker"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

<com.erz.timepicker_library.TimePicker
    xmlns:timepicker="http://schemas.android.com/apk/res-auto"
    android:id="@+id/timePicker"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    timepicker:clock_color="#FF0000"
    timepicker:text_color="#FF0000"
    timepicker:dial_color="#FF0000"/>
TimePicker timePicker = (TimePicker) findViewById(R.id.timePicker);

//or 

TimePicker timePicker = new TimePicker(context);

//Set TimePicker Color
timePicker.setColor(Color.BLUE);

//Set Dial Color
timePicker.setDialColor(Color.RED);

//Set Clock Color
timePicker.setClockColor(Color.GREEN);

//Set Text Color
timePicker.setTextColor(Color.YELLOW);

//Disable Touch
timePicker.disableTouch(true);

//Enable Twenty Four Hour Clock
timePicker.enableTwentyFourHour(true);

//Set Time
timePicker.setTime(new Date());

//Get Time
timePicker.getTime();

//Set OnTimeChangedListener
timePicker.setTimeChangedListener(this);

//OnTimeChangeListener Interface
public static interface OnTimeChangedListener {
    public void timeChanged(Date date);
}

License

Copyright 2015 erz05
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.