{"id":14979962,"url":"https://github.com/javiersantos/bottomdialogs","last_synced_at":"2025-04-04T14:08:44.569Z","repository":{"id":46126271,"uuid":"61056219","full_name":"javiersantos/BottomDialogs","owner":"javiersantos","description":"An Android library that shows a customizable Material-based bottom sheet. API 11+ required.","archived":false,"fork":false,"pushed_at":"2021-11-12T08:16:01.000Z","size":2279,"stargazers_count":641,"open_issues_count":28,"forks_count":118,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-04-04T14:08:39.390Z","etag":null,"topics":["android-library","bottom-sheet","dialog","gradle","material-design"],"latest_commit_sha":null,"homepage":"","language":"Java","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/javiersantos.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}},"created_at":"2016-06-13T17:29:37.000Z","updated_at":"2025-03-31T22:49:52.000Z","dependencies_parsed_at":"2022-09-11T16:11:24.968Z","dependency_job_id":null,"html_url":"https://github.com/javiersantos/BottomDialogs","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javiersantos%2FBottomDialogs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javiersantos%2FBottomDialogs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javiersantos%2FBottomDialogs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javiersantos%2FBottomDialogs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/javiersantos","download_url":"https://codeload.github.com/javiersantos/BottomDialogs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247190252,"owners_count":20898702,"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-library","bottom-sheet","dialog","gradle","material-design"],"created_at":"2024-09-24T14:01:00.884Z","updated_at":"2025-04-04T14:08:44.553Z","avatar_url":"https://github.com/javiersantos.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eBottomDialogs \u003ca href=\"https://github.com/javiersantos/BottomDialogs#how-to-include\"\u003e\u003cimg src=\"https://jitpack.io/v/javiersantos/BottomDialogs.svg\"\u003e\u003c/a\u003e\u003c/h1\u003e\n\u003ch4 align=\"center\"\u003eAndroid Library\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca target=\"_blank\" href=\"https://android-arsenal.com/api?level=11\"\u003e\u003cimg src=\"https://img.shields.io/badge/API-11%2B-orange.svg\"\u003e\u003c/a\u003e\n  \u003ca target=\"_blank\" href=\"https://travis-ci.org/javiersantos/BottomDialogs\"\u003e\u003cimg src=\"https://travis-ci.org/javiersantos/BottomDialogs.svg?branch=master\"\u003e\u003c/a\u003e\n  \u003ca target=\"_blank\" href=\"http://android-arsenal.com/details/1/3735\"\u003e\u003cimg \t\tsrc=\"https://img.shields.io/badge/Android%20Arsenal-BottomDialogs-blue.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003eAndroid Library that shows a customizable Material-based bottom sheet.\u003c/p\u003e\n\n\u003ctable align=\"center\"\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\n            \u003cimg src=\"https://raw.githubusercontent.com/javiersantos/BottomDialogs/master/Screenshots/gif-1.gif\" height=\"400\" /\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\n            \u003cimg src=\"https://raw.githubusercontent.com/javiersantos/BottomDialogs/master/Screenshots/gif-2.gif\" width=\"500\" /\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n## How to include\nAdd the repository to your project **build.gradle**:\n\n```Gradle\nrepositories {\n    maven {\n        url \"https://jitpack.io\"\n    }\n}\n```\n\nAnd add the library to your module **build.gradle**:\n\n```Gradle\ndependencies {\n    compile 'com.github.javiersantos:BottomDialogs:1.2.1'\n}\n```\n\n## Usage\n### Basic Bottom Dialog\nA basic bottom dialog will be shown. You have access to methods such as `setTitle()`, `setContent()`, `setIcon()`, `setCancelable()`, `dismiss()`, etc. Customizations are explained below.\n\n```Java\nnew BottomDialog.Builder(this)\n\t.setTitle(\"Awesome!\")\n\t.setContent(\"What can we improve? Your feedback is always welcome.\")\n\t.show();\n```\n\nor\n\n```Java\nBottomDialog bottomDialog = new BottomDialog.Builder(this)\n\t.setTitle(\"Awesome!\")\n\t.setContent(\"What can we improve? Your feedback is always welcome.\")\n\t.build();\n...\nbottomDialog.show();\n```\n\n### Displaying an icon\nThe bottom dialog icon will be shown to the left of the title.\n\n```Java\nnew BottomDialog.Builder(this)\n\t.setTitle(\"Awesome!\")\n\t.setContent(\"What can we improve? Your feedback is always welcome.\")\n\t.setIcon(R.drawable.ic_launcher)\n\t//.setIcon(ContextCompat.getDrawable(this, R.drawable.ic_launcher))\n\t.show();\n```\n\n### Adding buttons and callbacks\nButtons are showed at the end of the bottom dialog. You can add your own text, colors and actions/callbacks.\n\n```Java\nnew BottomDialog.Builder(this)\n\t.setTitle(\"Awesome!\")\n\t.setContent(\"What can we improve? Your feedback is always welcome.\")\n\t.setPositiveText(\"OK\")\n\t.setPositiveBackgroundColorResource(R.color.colorPrimary)\n\t//.setPositiveBackgroundColor(ContextCompat.getColor(this, R.color.colorPrimary)\n\t.setPositiveTextColorResource(android.R.color.white)\n\t//.setPositiveTextColor(ContextCompat.getColor(this, android.R.color.colorPrimary)\n\t.onPositive(new BottomDialog.ButtonCallback() {\n\t\t@Override\n\t\tpublic void onClick(BottomDialog dialog) {\n\t\t\tLog.d(\"BottomDialogs\", \"Do something!\");\n\t\t}\n\t}).show();\n```\n\n```Java\nnew BottomDialog.Builder(this)\n\t.setTitle(\"Awesome!\")\n\t.setContent(\"What can we improve? Your feedback is always welcome.\")\n\t.setNegativeText(\"Exit\")\n\t.setNegativeTextColorResource(R.color.colorAccent)\n\t//.setNegativeTextColor(ContextCompat.getColor(this, R.color.colorAccent)\n\t.onNegative(new BottomDialog.ButtonCallback() {\n\t\t@Override\n\t\tpublic void onClick(BottomDialog dialog) {\n\t\t\tLog.d(\"BottomDialogs\", \"Do something!\");\n\t\t}\n\t}).show();\n```\n\nIf no `onPositive()` or `onNegative()` callbacks are provided, then the bottom dialog will be dismissed when tapping de button.\n\nIf `autoDismiss()` is turned `false`, then you must manually dismiss the dialog in these callbacks. Auto dismiss is `true` by default.\n\n### Dismissing when touching outside\nThe `setCancelable()` method lets you disable dismissing the bottom dialog when you tap outside the dialog window.\n\n```Java\nnew BottomDialog.Builder(this)\n\t.setTitle(\"Awesome!\")\n\t.setContent(\"What can we improve? Your feedback is always welcome.\")\n\t.setCancelable(false)\n\t.show();\n```\n\n### Adding a custom view\nYou can add custom view to your bottom dialog just by adding the layout to the `setCustomView()` method.\n\n```Java\nnew BottomDialog.Builder(this)\n\t.setTitle(\"Awesome!\")\n\t.setContent(\"What can we improve? Your feedback is always welcome.\")\n\t.setCustomView(R.layout.my_custom_view)\n\t.show();\n```\n\nA detailed description is available at: https://github.com/javiersantos/BottomDialogs/wiki/Adding-a-custom-view\n\n### Adding a custom color and font\n\nYou can add custom colors and fonts to bottom dialog by using the view objects: `getIconImageView()`, `getTitleTextView()`, `getContentTextView()`, `getNegativeButton()` and `getPositiveButton()`. For example:\n\n```Java\nBottomDialog bottomDialog = BottomDialog.Builder(this)\n\t...\n\t.build();\n\nbottomDialog.getTitleTextView().setTextColor(Color.parseColor(\"#8f000000\"));\nbottomDialog.getTitleTextView().setTypeface(BaseActivity.getFont(Fonts.SEMI_BOLD));\nbottomDialog.show();\n```\n\n## Third Party Bindings\n\n### React Native\nYou may now use this library with [React Native](https://github.com/facebook/react-native) via the module [here](https://github.com/prscX/react-native-bottom-action-sheet)\n\n\n## License\n\tCopyright 2016-2018 Javier Santos\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaviersantos%2Fbottomdialogs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaviersantos%2Fbottomdialogs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaviersantos%2Fbottomdialogs/lists"}