{"id":13609450,"url":"https://github.com/ehsunshine/colored-time-selector","last_synced_at":"2025-04-12T20:31:58.411Z","repository":{"id":118638327,"uuid":"115939377","full_name":"ehsunshine/colored-time-selector","owner":"ehsunshine","description":"A smart colored time selector. Users can select just free time with a handy colorful range selector.","archived":false,"fork":false,"pushed_at":"2018-01-05T18:41:27.000Z","size":656,"stargazers_count":152,"open_issues_count":1,"forks_count":17,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-07T15:45:07.001Z","etag":null,"topics":["colored","range","selector","time"],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ehsunshine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-01-01T18:51:30.000Z","updated_at":"2024-04-15T08:56:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"26002bb4-11de-4a18-973a-5fc4f31aebc6","html_url":"https://github.com/ehsunshine/colored-time-selector","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsunshine%2Fcolored-time-selector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsunshine%2Fcolored-time-selector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsunshine%2Fcolored-time-selector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsunshine%2Fcolored-time-selector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ehsunshine","download_url":"https://codeload.github.com/ehsunshine/colored-time-selector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248629741,"owners_count":21136304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["colored","range","selector","time"],"created_at":"2024-08-01T19:01:35.043Z","updated_at":"2025-04-12T20:31:57.720Z","avatar_url":"https://github.com/ehsunshine.png","language":"Kotlin","funding_links":["https://ko-fi.com/D1D775AP'"],"categories":["Libraries","Kotlin"],"sub_categories":["Android"],"readme":"[![Download](https://api.bintray.com/packages/ehsun/maven/colored-time-range-selector/images/download.svg)](https://bintray.com/ehsun/maven/colored-time-range-selector/_latestVersion)\n[![Android Arsenal]( https://img.shields.io/badge/Android%20Arsenal-colored--time--selector-green.svg?style=flat )]( https://android-arsenal.com/details/1/6634 )\n[![GitHub license](https://img.shields.io/github/license/ehsunshine/colored-time-selector.svg)](https://github.com/ehsunshine/colored-time-selector/blob/master/LICENSE)\n[![Build Status](https://travis-ci.org/ehsunshine/colored-time-selector.svg?branch=master)](https://travis-ci.org/ehsunshine/colored-time-selector)\n\n# Colored Time Range Selector\nA smart colored time range selector. Users can select just free time with a handy colorful range selector.\n\n## Screen Shots\n\u003cimg src=\"https://github.com/ehsunshine/colored-time-selector/blob/master/screenshots/screen1.jpg\" alt=\"Colored Time Range Bar Selector\" width=\"256\"\u003e\n\u003cimg src=\"https://github.com/ehsunshine/colored-time-selector/blob/master/screenshots/screen2.jpg\" alt=\"Colored Time Range Bar Selector\" width=\"256\"\u003e\n\n## Features\n\n- Select a `time range` between 2 hours\n- Highlight `available time range` with your desire color\n- Select `just free times` in a range\n- Two different type of view, with `Selector` and without it\n\n## Use it\n\n**build.gradle**\n```gradle\ndependencies {\n    implementation 'de.ehsun.coloredtimebar:coloredtimebar:1.0'\n}\n```\n\nIn your layout use the ColoredTimeBar as below:\n\n```xml\n\u003cde.ehsun.coloredtimebar.TimelineView\n            android:id=\"@+id/timelineView\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            app:barColorAvailable=\"@color/available_time_default_color\"\n            app:barColorHighlight=\"@color/selector_default_color\"\n            app:barColorNotAvailable=\"@color/timeline_default_color\"\n            app:barWidth=\"16dp\"\n            app:fractionLineColor=\"@color/separatorDark\"\n            app:fractionLineLength=\"8dp\"\n            app:fractionLineWidth=\"1dp\"\n            app:fractionPrimaryTextColor=\"@color/fraction_default_color\"\n            app:fractionSecondaryTextColor=\"@color/fraction_default_color\"\n            app:fractionTextInterval=\"2\"\n            app:fractionTextSize=\"8sp\"\n            app:timeRange=\"07:00-19:00\" /\u003e\n```\nIn your code you can easily set the available time by passing an array of time range string as below:\n\n```kotlin\ntimelineView.setAvailableTimeRange(listOf(\"07:00 - 10:15\", \"12:00 - 15:00\"))\n```\nAnd to enable picker handles use it as below:\n\n```xml\n\u003cde.ehsun.coloredtimebar.TimelinePickerView\n                android:id=\"@+id/timelinePicker\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                app:barColorAvailable=\"@color/available_time_default_color\"\n                app:barColorHighlight=\"@color/selector_default_color\"\n                app:barColorNotAvailable=\"@color/timeline_default_color\"\n                app:barWidth=\"24dp\"\n                app:fractionLineColor=\"@color/separatorDark\"\n                app:fractionLineLength=\"8dp\"\n                app:fractionLineWidth=\"1dp\"\n                app:fractionPrimaryTextColor=\"@color/colorGrey900\"\n                app:fractionSecondaryTextColor=\"@color/colorBlueGrey500\"\n                app:fractionTextInterval=\"1\"\n                app:fractionTextSize=\"8sp\"\n                app:stepSize=\"15\"\n                app:timeRange=\"07:00-19:00\" /\u003e\n```\n\n```kotlin\ntimelinePicker.setOnSelectedTimeRangeChangedListener { from, to -\u003e\n            selectedTimeTextView.text = getString(R.string.from_to, from.format(), to.format())\n        }\n```\n\n\u003cimg src=\"https://github.com/ehsunshine/colored-time-selector/blob/master/screenshots/screen3.jpg\" alt=\"Colored Time Range Bar Selector\"\u003e\n\n## Do you like it?\nUse it and develop it as you like and buy me a cup of tea :)\n\n\u003ca href='https://ko-fi.com/D1D775AP' target='_blank'\u003e\u003cimg height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi1.png?v=0' border='0' alt='Buy Me a Coffee at ko-fi.com' /\u003e\u003c/a\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehsunshine%2Fcolored-time-selector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fehsunshine%2Fcolored-time-selector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehsunshine%2Fcolored-time-selector/lists"}