├── ic_launcher-web.png ├── TimePickerWithSeconds.apk ├── libs └── android-support-v4.jar ├── res ├── drawable-hdpi │ └── ic_launcher.png ├── drawable-mdpi │ └── ic_launcher.png ├── drawable-xhdpi │ └── ic_launcher.png ├── drawable-xxhdpi │ └── ic_launcher.png ├── values-sw600dp │ └── dimens.xml ├── values │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml ├── menu │ └── main.xml ├── values-sw720dp-land │ └── dimens.xml ├── values-nl │ └── strings.xml ├── values-v11 │ └── styles.xml ├── values-v14 │ └── styles.xml └── layout │ ├── time_picker_dialog.xml │ ├── activity_main.xml │ └── time_picker_widget.xml ├── Screenshot_2014-03-03-19-55-49.png ├── .settings └── org.eclipse.jdt.core.prefs ├── .classpath ├── project.properties ├── .gitignore ├── proguard-project.txt ├── .project ├── AndroidManifest.xml ├── README.md └── src └── com └── ikovac └── timepickerwithseconds ├── MainActivity.java └── view ├── MyTimePickerDialog.java └── TimePicker.java /ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IvanKovac/TimePickerWithSeconds/HEAD/ic_launcher-web.png -------------------------------------------------------------------------------- /TimePickerWithSeconds.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IvanKovac/TimePickerWithSeconds/HEAD/TimePickerWithSeconds.apk -------------------------------------------------------------------------------- /libs/android-support-v4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IvanKovac/TimePickerWithSeconds/HEAD/libs/android-support-v4.jar -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IvanKovac/TimePickerWithSeconds/HEAD/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IvanKovac/TimePickerWithSeconds/HEAD/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /Screenshot_2014-03-03-19-55-49.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IvanKovac/TimePickerWithSeconds/HEAD/Screenshot_2014-03-03-19-55-49.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IvanKovac/TimePickerWithSeconds/HEAD/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IvanKovac/TimePickerWithSeconds/HEAD/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.source=1.6 5 | -------------------------------------------------------------------------------- /res/values-sw600dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16dp 5 | 16dp 6 | 7 | 8 | -------------------------------------------------------------------------------- /res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/values-sw720dp-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 128dp 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | TimePickerWithSeconds 5 | Settings 6 | Set time 7 | Cancel 8 | Time : 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/values-nl/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | TimePickerWithSeconds 5 | Instellingen 6 | Tijd instellen 7 | Annuleren 8 | Tijd : 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-18 15 | android.library=true 16 | -------------------------------------------------------------------------------- /res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #Android specific 2 | # built application files 3 | *.ap_ 4 | 5 | obj 6 | 7 | # files for the dex VM 8 | *.dex 9 | 10 | # Java class files 11 | *.class 12 | 13 | # generated files 14 | bin/ 15 | gen/ 16 | .apt_generated/ 17 | gen-db/ 18 | 19 | target/ 20 | # Local configuration file (sdk path, etc) 21 | local.properties 22 | 23 | #Eclipse specific 24 | *.pydevproject 25 | .project 26 | .metadata 27 | bin/** 28 | tmp/** 29 | tmp/**/* 30 | *.tmp 31 | *.bak 32 | *.swp 33 | *~.nib 34 | local.properties 35 | .classpath 36 | .settings/ 37 | .loadpath 38 | 39 | # External tool builders 40 | .externalToolBuilders/ 41 | 42 | # Locally stored "Eclipse launch configurations" 43 | *.launch 44 | 45 | # CDT-specific 46 | .cproject 47 | 48 | # PDT-specific 49 | .buildpath 50 | 51 | # IDEA specific 52 | .idea 53 | *.iml 54 | -------------------------------------------------------------------------------- /proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | TimePickerWithSeconds 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 16 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /res/layout/time_picker_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 24 | 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | TimePickerWithSeconds 2 | ===================== 3 | 4 | Android TimePicker widget with seconds field as well. This widget is an extension of native TimePicker which provides only minute and hour fields. 5 | 6 | ![alt tag](https://raw.github.com/IvanKovac/TimePickerWithSeconds/master/Screenshot_2014-03-03-19-55-49.png) 7 | 8 | 9 | 10 | Aplication 11 | ------ 12 | The demo application (.apk) is under the root dir : TimePickerWithSeconds.apk 13 | 14 | Quick Setup - Gradle 15 | ------ 16 | 17 | ``` java 18 | dependencies { 19 | ... 20 | compile 'com.kovachcode:timePickerWithSeconds:1.0.1' 21 | } 22 | ``` 23 | 24 | Quick Setup - Eclipse 25 | ------ 26 | 27 | This is Android library project. To use it within your application follow these steps: 28 | 29 | 1. Download the project to your workspace 30 | 2. Import project into Eclipse 31 | 3. Right click on YOUR project - > Properties -> Android 32 | Under the library choose "Add" and add TimePickerWithSeconds project 33 | 34 | Usage 35 | ------ 36 | 37 | Show the Picker with: 38 | 39 | ``` java 40 | MyTimePickerDialog mTimePicker = new MyTimePickerDialog(this, new MyTimePickerDialog.OnTimeSetListener() { 41 | 42 | @Override 43 | public void onTimeSet(TimePicker view, int hourOfDay, int minute, int seconds) { 44 | // TODO Auto-generated method stub 45 | /*time.setText(getString(R.string.time) + String.format("%02d", hourOfDay)+ 46 | ":" + String.format("%02d", minute) + 47 | ":" + String.format("%02d", seconds)); */ 48 | } 49 | }, now.get(Calendar.HOUR_OF_DAY), now.get(Calendar.MINUTE), now.get(Calendar.SECOND), true); 50 | mTimePicker.show(); 51 | ``` 52 | 53 | 54 | Enjoy! 55 | 56 | Licence 57 | ------ 58 | Feel free to use and change this code and include it in any of the projects you wish. There is no guarantee of any kind. 59 | -------------------------------------------------------------------------------- /res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 32 | 33 | 40 | 41 |