{"id":20047699,"url":"https://github.com/bitvale/pacbutton","last_synced_at":"2025-07-30T12:06:26.572Z","repository":{"id":221806914,"uuid":"156256031","full_name":"bitvale/PacButton","owner":"bitvale","description":"Android implementation of switch animation https://dribbble.com/shots/5487871-Video-Photo-Switcher-Exploration from Oleg Frolov https://dribbble.com/Volorf ","archived":false,"fork":false,"pushed_at":"2018-12-03T19:17:54.000Z","size":306,"stargazers_count":60,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-05T10:40:40.537Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitvale.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-05T17:26:07.000Z","updated_at":"2023-11-09T19:33:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"ed3af4c2-3f78-46c0-abb0-d2739df4c6ed","html_url":"https://github.com/bitvale/PacButton","commit_stats":null,"previous_names":["bitvale/pacbutton"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bitvale/PacButton","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitvale%2FPacButton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitvale%2FPacButton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitvale%2FPacButton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitvale%2FPacButton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitvale","download_url":"https://codeload.github.com/bitvale/PacButton/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitvale%2FPacButton/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267865920,"owners_count":24157343,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-13T11:37:20.516Z","updated_at":"2025-07-30T12:06:26.533Z","avatar_url":"https://github.com/bitvale.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PacButton\n\n\u003cimg src=\"/art/preview.gif\" alt=\"sample\" title=\"sample\" width=\"320\" height=\"600\" align=\"right\" vspace=\"52\" /\u003e\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Platform](https://img.shields.io/badge/platform-android-green.svg)](http://developer.android.com/index.html)\n[![API](https://img.shields.io/badge/API-19%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=19)\n\nCreated this cool [video/photo switch animation](https://dribbble.com/shots/5487871-Video-Photo-Switcher-Exploration) from [Oleg Frolov](https://dribbble.com/Volorf) as android library. \n\n\u003ca href=\"https://dribbble.com/shots/5613598-Video-Photo-Switcher\"\u003e\n  \u003cimg alt=\"Design on Dribbble\" src=\"/art/dribbble.png\" width=\"196\" height=\"80\" hspace=\"15\" /\u003e\n\u003c/a\u003e\n\nUSAGE\n-----\n\nJust add PacButton view in your layout XML and PacButton library in your project via Gradle:\n\n```gradle\ndependencies {\n  implementation 'com.bitvale:pacbutton:1.0.0'\n}\n```\n\nXML\n-----\n\n```xml\n\u003ccom.bitvale.pacbutton.PacButton\n    android:id=\"@+id/pac_button\"\n    android:layout_width=\"@dimen/pac_size\"\n    android:layout_height=\"@dimen/pac_size\"\n    app:topIcon=\"@drawable/ic_video\"\n    app:bottomIcon=\"@drawable/ic_photo\"\n    app:iconHeight=\"@dimen/icon_size\"\n    app:iconWidth=\"@dimen/icon_size\"\n    app:pacGradientColor_1=\"@color/gradient_color_1\"\n    app:pacGradientColor_2=\"@color/gradient_color_2\" /\u003e\n```\n\nYou must use the following properties in your XML to change your PacButton.\n\n\n##### Properties:\n\n* `app:topIcon`                     (drawable)  -\u003e default  none\n* `app:bottomIcon`                  (drawable)  -\u003e default  none\n* `app:iconHeight`                  (dimension) -\u003e default  none\n* `app:iconWidth`                   (dimension) -\u003e default  none\n* `app:pacColor`                    (color)     -\u003e default  none\n* `app:pacGradientColor_1`          (color)     -\u003e default  #7651F8\n* `app:pacGradientColor_2`          (color)     -\u003e default  #E74996\n\nYou can use solid color with pacColor property or gradient with pacGradientColor properties.\n\nKotlin\n-----\n\n```kotlin\npac_button.setSelectAction {\n    if (it) some_image.setImageResource(R.drawable.ic_video_cam)\n    else some_image.setImageResource(R.drawable.ic_photo_cam)\n}\n\npac_button.setAnimationUpdateListener { progress -\u003e\n    some_image.alpha = 1 - progress\n}\n```\n\nLICENCE\n-----\n\nPacButton by [Alexander Kolpakov](https://play.google.com/store/apps/dev?id=7044571013168957413) is licensed under an [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitvale%2Fpacbutton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitvale%2Fpacbutton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitvale%2Fpacbutton/lists"}