{"id":15034889,"url":"https://github.com/skydoves/androidveil","last_synced_at":"2025-05-15T10:07:34.371Z","repository":{"id":40655053,"uuid":"155507525","full_name":"skydoves/AndroidVeil","owner":"skydoves","description":" :performing_arts: An easy and flexible way to implement loading skeletons and shimmering effects on layouts for Android.","archived":false,"fork":false,"pushed_at":"2024-06-26T11:44:44.000Z","size":5015,"stargazers_count":1546,"open_issues_count":11,"forks_count":106,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-05-15T10:06:58.234Z","etag":null,"topics":["android","android-library","android-ui","androidveil","recyclerview","shimmer","skeleton","skydoves"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skydoves.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"skydoves","custom":["https://www.paypal.me/skydoves","https://www.buymeacoffee.com/skydoves"]}},"created_at":"2018-10-31T06:08:30.000Z","updated_at":"2025-05-06T22:28:51.000Z","dependencies_parsed_at":"2024-01-14T02:37:23.338Z","dependency_job_id":"8af635b9-31b5-4080-bc7a-0d86c970a43c","html_url":"https://github.com/skydoves/AndroidVeil","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skydoves%2FAndroidVeil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skydoves%2FAndroidVeil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skydoves%2FAndroidVeil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skydoves%2FAndroidVeil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skydoves","download_url":"https://codeload.github.com/skydoves/AndroidVeil/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319721,"owners_count":22051074,"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":["android","android-library","android-ui","androidveil","recyclerview","shimmer","skeleton","skydoves"],"created_at":"2024-09-24T20:26:41.348Z","updated_at":"2025-05-15T10:07:29.355Z","avatar_url":"https://github.com/skydoves.png","language":"Kotlin","readme":"\n\u003ch1 align=\"center\"\u003eAndroidVeil\u003c/h1\u003e\u003c/br\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/24237865/50557081-fdd3a300-0d24-11e9-82e3-6ddad326cd40.png\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\nAn easy, flexible way to implement veil skeletons and shimmering effect for Android.\n\u003c/p\u003e\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://opensource.org/licenses/Apache-2.0\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/badge/License-Apache%202.0-blue.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://android-arsenal.com/api?level=21\"\u003e\u003cimg alt=\"API\" src=\"https://img.shields.io/badge/API-21%2B-brightgreen.svg?style=flat\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/skydoves/AndroidVeil/actions\"\u003e\u003cimg alt=\"Build Status\" src=\"https://github.com/skydoves/TransformationLayout/workflows/Android%20CI/badge.svg\"/\u003e\u003c/a\u003e \n  \u003ca href=\"https://androidweekly.net/issues/issue-334\"\u003e\u003cimg alt=\"Android Weekly\" src=\"https://img.shields.io/badge/Android%20Weekly-%23334-orange.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://medium.com/swlh/how-to-implement-veil-skeletons-and-shimmering-effects-to-your-layouts-and-recyclerview-on-android-44af35d90de5\"\u003e\u003cimg alt=\"Medium\" src=\"https://skydoves.github.io/badges/Story-Medium.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://skydoves.github.io/libraries/androidveil/javadoc/androidveil/index.html\"\u003e\u003cimg alt=\"Android Weekly\" src=\"https://img.shields.io/badge/Javadoc-AndroidVeil-yellow.svg\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/skydoves/AndroidVeil/blob/master/art/shimmer01.gif\" width=\"32%\"/\u003e\n\u003cimg src=\"https://github.com/skydoves/AndroidVeil/blob/master/art/shimmer02.gif\" width=\"32%\"/\u003e\n\u003c/p\u003e\n\n## Download\n[![Maven Central](https://img.shields.io/maven-central/v/com.github.skydoves/androidveil.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.github.skydoves%22%20AND%20a:%22androidveil%22)\n\n### Gradle\nAdd the dependency below to your **module**'s `build.gradle` file:\n\n```gradle\ndependencies {\n    implementation(\"com.github.skydoves:androidveil:1.1.4\")\n}\n```\n\n## Usage\nFirst, add following XML namespace inside your XML layout file:\n\n```gradle\nxmlns:app=\"http://schemas.android.com/apk/res-auto\"\n```\n\n#### VeilLayout in layout\n\n```gradle\n\u003ccom.skydoves.androidveil.VeilLayout\n      android:id=\"@+id/veilLayout\"\n      android:layout_width=\"match_parent\"\n      android:layout_height=\"match_parent\"\n      app:veilLayout_veiled=\"true\" // shows veils initially\n      app:veilLayout_shimmerEnable=\"true\" // sets shimmer enable\n      app:veilLayout_baseColor=\"@android:color/holo_green_dark\" // sets shimmer base color\n      app:veilLayout_highlightColor=\"@android:color/holo_green_light\" // sets shimmer highlight color\n      app:veilLayout_baseAlpha=\"0.6\" // sets shimmer base alpha value\n      app:veilLayout_highlightAlpha=\"1.0\" // sets shimmer highlight alpha value\n      app:veilLayout_dropOff=\"0.5\"// sets how quickly the shimmer`s gradient drops-off\n      app:veilLayout_radius=\"6dp\" // sets a corner radius of the whole veiled items \u003e\n\n      \u003cTextView\n         android:layout_width=\"match_parent\"\n         android:layout_height=\"wrap_content\"\n         android:text=\"And now here is my secret, a very simple secret\"\n         android:textColor=\"@android:color/white\"\n         android:textSize=\"22sp\"/\u003e\n\n      \u003c!-- Skip --\u003e    \n\n\u003c/com.skydoves.androidveil.VeilLayout\u003e\n```\n#### Veil and UnVeil\nWe can implement veiled skeletons using below methods.\n\n```java\nveilLayout.veil()\nveilLayout.unVeil()\n```\n\n#### Implement veils using layout resource\nWe can implement veiled skeletons using the layout resource.\n\n```java\nveilLayout.layout = R.layout.layout_item_test\n```\n\n## VeilRecyclerFrameView\n`VeilRecyclerFrameView` implements veiled skeletons for RecyclerView with the shimmer effect.\n\n#### VeilRecyclerFrameView in layout\n\n```gradle\n\u003ccom.skydoves.androidveil.VeilRecyclerFrameView\n        android:id=\"@+id/veilRecyclerView\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        app:veilFrame_layout=\"@layout/item_profile\" // sets to make veiling target layout\n        app:veilFrame_veiled=\"true\" // shows veils initially\n        app:veilFrame_shimmerEnable=\"true\" // sets shimmer enable\n        app:veilFrame_baseColor=\"@android:color/holo_green_dark\" // sets shimmer base color\n        app:veilFrame_highlightColor=\"@android:color/holo_green_light\" // sets shimmer highlight color\n        app:veilFrame_baseAlpha=\"0.6\" // sets shimmer base alpha value\n        app:veilFrame_highlightAlpha=\"1.0\" // sets shimmer highlight alpha value\n        app:veilFrame_radius=\"8dp\" // sets a corner radius of the whole veiled items \n        app:veilFrame_isItemWrapContentHeight=\"true\"  // sets height of list item wrap_content\n        app:veilFrame_isItemWrapContentWidth=\"true\"   // sets width of list item wrap_content /\u003e\n```\n\nAnd we should attach our own adapter and LayoutManager.\n```java\nveilRecyclerView.setAdapter(adapter) // sets your own adapter\nveilRecyclerView.setLayoutManager(LinearLayoutManager(this)) // sets LayoutManager\nveilRecyclerView.addVeiledItems(15) // add veiled 15 items\n```\n\n#### VeilRecyclerFrameView with a horizontal carousel\n\nAutomatically masking a horizontal layout is **not supported yet**. Horizontal (carousel) layouts **can** be used if you specify their shimmer layout yourself in advance (and tell the view to use this prepared layout by setting `isPrepared = true`). See `CarouselActivity` for an example\n```kotlin\nveilRecyclerView.setVeilLayout(\n  layout = R.layout.item_prepared_shimmer_carousel,\n  isPrepared = true\n)\nveilRecyclerView.setAdapter(adapter)\nveilRecyclerView.setLayoutManager(LinearLayoutManager(this, RecyclerView.HORIZONTAL, false))\naddVeiledItems(15)\n```\n\n#### Veil and UnVeil\nWe can implement veiled skeletons using below methods.\n\n```java\nveilRecyclerView.veil() // shows veil skeletons\nveilRecyclerView.unVeil() // disappear veils and shows your own recyclerView\n```\n\n#### RecyclerView\nWe can access our Recyclerview and veiledRecyclerView using the  below methods.\n```java\nveilRecyclerView.getRecyclerView() // veilRecyclerView.getRecyclerView().setHasFixedSize(true)\nveilRecyclerView.getVeiledRecyclerView()\n```\n\n## Shimmer\nThis library using [shimmer-android](https://github.com/facebook/shimmer-android) by Facebook.\u003cbr\u003e\nHere are the detail [shimmer-instruction](http://facebook.github.io/shimmer-android/) about shimmer or you can reference below examples.\n\n### create using Builder\nThis is how to create `Shimmer`'s instance using `Shimmer.Builder` class.\n```kotlin\nval shimmer = Shimmer.ColorHighlightBuilder()\n      .setBaseColor(ContextCompat.getColor(context, R.color.shimmerBase0))\n      .setHighlightColor(ContextCompat.getColor(context, R.color.shimmerHighlight0))\n      .setBaseAlpha(1f)\n      .setHighlightAlpha(1f)\n      .build()\n\nveilLayout.shimmer = shimmer // sets shimmer to VeilLayout\nveilRecyclerView.shimmer = shimmer // sets shimmer to VeilRecyclerView\n```\n\n### create using kotlin dsl\nThis is how to create `Shimmer`'s instance using kotlin dsl.\n```kotlin\nval shimmer_alpha = alphaShimmer {\n      setBaseAlpha(1.0f)\n      setHighlightAlpha(0.5f)\n}\nval shimmer_color = colorShimmer {\n      setBaseAlpha(1.0f)\n      setHighlightAlpha(0.5f)\n      setBaseColor(ContextCompat.getColor(context, R.color.colorPrimary))\n      setHighlightColor(ContextCompat.getColor(context, R.color.colorPrimaryDark))\n}\n```\n\n## AndroidVeil Attributes\nAttributes | Type | Default | Description\n--- | --- | --- | ---\nveiled | Boolean | false | shows veils initially.\nlayout | Int | -1 | implement veils using the layout resource.\nradius | dimension | 8dp | sets corner radius to the veil items.\ndrawable | Drawable | null | sets background drawable to the veil items.\nshimmerEnable | Boolean | true | sets shimmer enable.\nbaseColor | ColorInt | Color.LTGRAY | sets shimmer base color.\nhighlightColor | ColorInt | Color.DKGRAY | sets shimmer highlight color.\nbaseAlpha | Float | 1.0f | sets shimmer base alpha value.\nhighlightAlpha | Float | 1.0f | sets shimmer highlight alpha value.\ndropOff | Float | 0.5f | sets how quickly the shimmer's gradient drops-off.\ndefaultChildVisible | Boolean | false | sets the child view's visibility when called veil and unveil.\nisItemWrapContentHeight | Boolean | false | sets height of veiled list item wrap_content\nisItemWrapContentWidth | Boolean | false | sets width of veiled list item wrap_content\n\n## Find this repository useful? :heart:\nSupport it by joining __[stargazers](https://github.com/skydoves/androidveil/stargazers)__ for this repository. :star: \u003cbr\u003e\nAlso __[follow](https://github.com/skydoves)__ me for my next creations! 🤩\n\n# License\n```xml\nCopyright 2018 skydoves\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","funding_links":["https://github.com/sponsors/skydoves","https://www.paypal.me/skydoves","https://www.buymeacoffee.com/skydoves"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskydoves%2Fandroidveil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskydoves%2Fandroidveil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskydoves%2Fandroidveil/lists"}