{"id":16987050,"url":"https://github.com/amrdeveloper/lottiedialog","last_synced_at":"2025-03-22T15:30:49.659Z","repository":{"id":40628336,"uuid":"419838909","full_name":"AmrDeveloper/LottieDialog","owner":"AmrDeveloper","description":"Android Library to create Lottie animation view dialog easily with a lot of customization","archived":false,"fork":false,"pushed_at":"2022-07-16T14:51:07.000Z","size":1309,"stargazers_count":57,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-18T13:21:22.367Z","etag":null,"topics":["android","android-library","android-ui","hacktoberfest","java","kotlin","lottie","lottie-android","lottie-animation"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AmrDeveloper.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-21T18:41:32.000Z","updated_at":"2024-09-29T00:02:14.000Z","dependencies_parsed_at":"2022-07-14T04:10:37.658Z","dependency_job_id":null,"html_url":"https://github.com/AmrDeveloper/LottieDialog","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmrDeveloper%2FLottieDialog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmrDeveloper%2FLottieDialog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmrDeveloper%2FLottieDialog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmrDeveloper%2FLottieDialog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AmrDeveloper","download_url":"https://codeload.github.com/AmrDeveloper/LottieDialog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244978435,"owners_count":20541854,"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","hacktoberfest","java","kotlin","lottie","lottie-android","lottie-animation"],"created_at":"2024-10-14T02:47:56.030Z","updated_at":"2025-03-22T15:30:49.070Z","avatar_url":"https://github.com/AmrDeveloper.png","language":"Java","readme":"# LottieDialog\n\n![Build](https://github.com/amrdeveloper/lottiedialog/actions/workflows/build.yml/badge.svg)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/b49c133e1a1c4f4bab87354e4713c3bb)](https://www.codacy.com/gh/AmrDeveloper/LottieDialog/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=AmrDeveloper/LottieDialog\u0026amp;utm_campaign=Badge_Grade)\n[![CodeFactor](https://www.codefactor.io/repository/github/amrdeveloper/lottiedialog/badge)](https://www.codefactor.io/repository/github/amrdeveloper/lottiedialog)\n[![Min API Level](https://img.shields.io/badge/API-%2B16-brightgreen)]()\n![Maven Central](https://img.shields.io/maven-central/v/io.github.amrdeveloper/lottiedialog?color=green)\n[![Jitpack Version](https://jitpack.io/v/AmrDeveloper/Lottiedialog.svg)](https://jitpack.io/#AmrDeveloper/Lottiedialog)\n\nAndroid Library to create Lottie animation view dialog easily with a lot of customization\n\n\u003cimg src=\"media/success_dialog.gif\" alt=\"animated\" width=\"24%\" height=\"320px\"/\u003e \u003cimg src=\"media/location_dialog.gif\" alt=\"animated\" width=\"24%\" height=\"320px\"/\u003e\n\u003cimg src=\"media/no_internet_dialog.gif\" alt=\"animated\" width=\"24%\" height=\"320px\"/\u003e \u003cimg src=\"media/photo_dialog.gif\" alt=\"animated\" width=\"24%\" height=\"320px\"/\u003e\n\n### Why you should use Lottie Dialog\n\n- You have no limited type of dialog, you create your own types and using them.\n- You don't need to add unused file in your project, just add what you will use.\n- You can add any number of buttons and customize them as you want.\n- Customize dialog title as you want, change color, size and visibility.\n- Customize dialog message as you want, change color, size and visibility.\n- You can change your dialog width and height by number of by percentage.\n- You can change the animation view width and height.\n- Set your animation easily from assets, raw resources or URLs.\n- And more...\n\n### Download or create Lottie animation file\n\n- You can find many files and customize them from the Lottie offical website [LottieFiles.com](https://lottiefiles.com)\n- You can create your own lottie file from scratch, check Lottie Plugins [LottieFiles.com/Plugins](https://lottiefiles.com/plugins/after-effects)\n\n### Add Lottie Dialog to your project\n\nFrom Maven Central\n```gradle\nimplementation 'io.github.amrdeveloper:lottiedialog:1.0.0'\n```\n\u003cdetails\u003e\n  \u003csummary\u003eOr Add LottieDialog from Jitpack.io\u003c/summary\u003e\n  \n  Add it in your root build.gradle at the end of repositories\n  \n  ```gradle\n  allprojects {\n      repositories {\n           maven { url 'https://jitpack.io' }\n      }\n  }\n```\n             \n  Add the dependency      \n\n  ```gradle\n  implementation 'com.github.amrdeveloper:lottiedialog:1.0.0'\n  ```\n\u003c/details\u003e\n\nAnd sync the Gradle.\n\n### Code Example\n\n```java\nButton okButton = new Button(this);\nokButton.setText(\"Ok\");\nokButton.setOnClickListener(view -\u003e {});\n\nButton cancelButton = new Button(this);\ncancelButton.setText(\"Cancel\");\ncancelButton.setOnClickListener(view -\u003e {});\n\nLottieDialog dialog = new LottieDialog(this)\n    .setAnimation(R.raw.animation)\n    .setAnimationRepeatCount(LottieDialog.INFINITE)\n    .setAutoPlayAnimation(true)\n    .setTitle(\"Title\")\n    .setTitleColor(Color.WHITE)\n    .setMessage(\"Message...\")\n    .setMessageColor(Color.WHITE)\n    .setDialogBackground(Color.BLACK)\n    .setCancelable(false)\n    .addActionButton(okButton)\n    .addActionButton(cancelButton)\n    .setOnShowListener(dialogInterface -\u003e {})\n    .setOnDismissListener(dialogInterface -\u003e {})\n    .setOnCancelListener(dialogInterface -\u003e {});\ndialog.show();\n```\n\n### Documentation\n\nLottie Dialog was designed with a fluent interface concept and with the goal to make it customizable as much as we can\n\nSet dialog title.\n```java\nsetTitle(String title);\n```\n\nSet dialog title color.\n```java\nsetTitleColor(int color)\n```\n\nSet dialog title text size.\n```java\nsetTitleTextSize(float size)\n```\n\nSet dialog title visibility, the default value is `View.VISIBLE`.\n```java\nsetTitleVisibility(int visibility)\n```\n\nSet dialog message.\n```java\nsetMessage(String message)\n```\n\nSet dialog message text size.\n```java\nsetMessageTextSize(float size)\n```\n\nSet message visibility, the default value is `View.VISIBLE`.\n```java\nsetMessageVisibility(int visibility)\n```\n\nSet dialog background color.\n```java\nsetDialogBackground(int color)\n```\n\nSet dialog background drawable.\n```java\nsetDialogBackgroundDrawable(Drawable drawable)\n```\n\nSet dialog dim amount.\n```java\nsetDialogDimAmount(float amount)\n```\n\nSet dialog cancelable.\n```java\nsetCancelable(boolean cancelable)\n```\n\nSet dialog canceled on touch outside.\n```java\nsetCanceledOnTouchOutside(boolean cancel)\n```\n\nSet dialog height.\n```java\nsetDialogHeight(int height)\n```\n\nSet dialog width.\n```java\nsetDialogWidth(int width)\n```\n\nSet dialog height by percentage, for example `0.50f` for `50%`.\n\n```java\nsetDialogHeightPercentage(float percentage)\n```\n\nSet dialog width by percentage, for example `0.50f` for `50%`.\n\n```java\nsetDialogWidthPercentage(float percentage)\n```\n\nSet Lottie animation view height.\n```java\nsetAnimationViewHeight(int height)\n```\n\nSet Lottie animation view width.\n```java\nsetAnimationViewWidth(int width)\n```\n\nSet animation from raw resources.\n```java\nsetAnimation(@RawRes int rawRes)\n```\n\nSet animation from Animation object.\n```java\nsetAnimation(Animation animation)\n```\n\nSet animation from assets folder\n```java\nsetAnimation(String assetName)\n```\n\nSet animation from URL, need `INTERNET` permission\n```java\nsetAnimationFromUrl(String url)\n```\n\nSet repeat count for the animation, for indefinitely use  `LottieDialog.INFINITE`\n```java\nsetAnimationRepeatCount(int count)\n```\n\nSet animation speed\n```java\nsetAnimationSpeed(float speed)\n```\n\nAdd action button, you should set listeners and customize it then add it to Lottie dialog\n```java\naddActionButton(Button button)\n```\n\nAdd action button with the index\n```java\naddActionButton(Button button, int index)\n```\n\nControl auto play animation when the dialog is showing\n```java\nsetAutoPlayAnimation(boolean autoplay)\n```\n\nCheck animation auto playing value\n```java\nisAutoPlayedAnimation()\n```\n\nPlay the animation.\n```java\nplayAnimation()\n```\n\nPause the animation.\n```java\npauseAnimation()\n```\n\ncancel the animation.\n```java\ncancelAnimation()\n```\n\nclear the animation.\n```java\nclearAnimation()\n```\n\nreverse the animation speed.\n```java\nreverseAnimationSpeed()\n```\n\nCheck if is animating or not.\n```java\nisAnimating()\n```\n\nShow Lottie dialog.\n```java\nshow()\n```\n\nCheck if Lottie dialog is showing.\n```java\nisShowinng()\n```\n\nDismiss Lottie dialog.\n```java\ndismiss()\n```\n\nCancel Lottie dialog`.\n```java\ncancel()\n```\n\nListen when Lottie dialog is showing.\n```java\nsetOnShowListener(DialogInterface.OnShowListener listener)\n```\n\nListen when Lottie dialog is canceled.\n```java\nsetOnCancelListener(DialogInterface.OnCancelListener listener)\n```\n\nListen when Lottie dialog is dismissed.\n```java\nsetOnDismissListener(DialogInterface.OnDismissListener listener)\n```\n\n### How to contribute\n\n- You are most welcome to request features, report bugs by creating a new issues.\n- Before starting implementing the feature please make sure the issue is approved and assigned to you.\n\n### License\n```\nMIT License\n\nCopyright (c) 2021 Amr Hesham\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famrdeveloper%2Flottiedialog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famrdeveloper%2Flottiedialog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famrdeveloper%2Flottiedialog/lists"}