{"id":13610714,"url":"https://github.com/marcoscgdev/DialogSheet","last_synced_at":"2025-04-13T01:32:30.598Z","repository":{"id":144174233,"uuid":"112856461","full_name":"marcoscgdev/DialogSheet","owner":"marcoscgdev","description":"An Android library to create fully material designed bottom dialogs similar to the Android Pay app.","archived":false,"fork":false,"pushed_at":"2024-01-27T20:27:39.000Z","size":1610,"stargazers_count":262,"open_issues_count":0,"forks_count":48,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-09-01T02:46:14.803Z","etag":null,"topics":["android","bottom","design","dialog","dialogs","dialogsheet","material","materialdesign","shell"],"latest_commit_sha":null,"homepage":"https://github.com/marcoscgdev/DialogSheet","language":"Kotlin","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/marcoscgdev.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,"roadmap":null,"authors":null}},"created_at":"2017-12-02T16:10:33.000Z","updated_at":"2024-06-27T13:00:51.000Z","dependencies_parsed_at":"2023-07-10T08:00:33.459Z","dependency_job_id":null,"html_url":"https://github.com/marcoscgdev/DialogSheet","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcoscgdev%2FDialogSheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcoscgdev%2FDialogSheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcoscgdev%2FDialogSheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcoscgdev%2FDialogSheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcoscgdev","download_url":"https://codeload.github.com/marcoscgdev/DialogSheet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223558273,"owners_count":17165101,"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","bottom","design","dialog","dialogs","dialogsheet","material","materialdesign","shell"],"created_at":"2024-08-01T19:01:47.321Z","updated_at":"2024-11-07T17:30:26.067Z","avatar_url":"https://github.com/marcoscgdev.png","language":"Kotlin","readme":"# DialogSheet   [![](https://jitpack.io/v/marcoscgdev/DialogSheet.svg)](https://jitpack.io/#marcoscgdev/DialogSheet)  ![open-issues](https://badgen.net/github/open-issues/marcoscgdev/DialogSheet)  ![last commit](https://badgen.net/github/last-commit/marcoscgdev/DialogSheet)\nAn Android library to create fully material designed bottom dialogs similar to the Android Pay app.\n\n---\n\n## Releases:\n\n#### Current release: 2.2.0.\n\nYou can see all the library releases [here](https://github.com/marcoscgdev/DialogSheet/releases).\n\n---\n\n## Screenshots\n\u003ckbd\u003e\u003cimg src=\"https://raw.githubusercontent.com/marcoscgdev/DialogSheet/master/screenshots/sc_1.png\" width=\"250\"\u003e\u003c/kbd\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003ckbd\u003e\u003cimg src=\"https://raw.githubusercontent.com/marcoscgdev/DialogSheet/master/screenshots/sc_2.png\" width=\"250\"\u003e\u003c/kbd\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003ckbd\u003e\u003cimg src=\"https://raw.githubusercontent.com/marcoscgdev/DialogSheet/master/screenshots/sc_4.png\" width=\"250\"\u003e\u003c/kbd\u003e\n\n\u003ckbd\u003e\u003cimg src=\"https://raw.githubusercontent.com/marcoscgdev/DialogSheet/master/screenshots/sc_3.png\" width=\"620\"\u003e\u003c/kbd\u003e\n\nDownload the sample apk [here](https://github.com/marcoscgdev/DialogSheet/releases/download/2.2.0/app-debug.apk).\n\n---\n\n## Usage:\n\n### Adding the depencency\n\nAdd this to your root *build.gradle* file:\n\n```\nallprojects {\n    repositories {\n        ...\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\n\nOr if you are using KTS, add this into your *settings.gradle.kts* file:\n\n```\ndependencyResolutionManagement {\n    ...\n    repositories {\n        ...\n        maven {\n           setUrl(\"https://jitpack.io\")\n        }\n    }\n}\n```\n\nNow add the dependency to your app *build.gradle* file:\n\n```\nimplementation 'com.github.marcoscgdev:DialogSheet:2.2.0'\n```\n\nOr if you are using KTS:\n\n```\nimplementation(\"com.github.marcoscgdev:DialogSheet:2.2.0\")\n```\n\n### Creating the dialog\n\nHere is a complete snippet of it usage:\n\n```java\nval dialogSheet = DialogSheet(this)\n    .setTitle(R.string.app_name)\n    .setMessage(R.string.lorem)\n    .setColoredNavigationBar(true)\n    .setTitleTextSize(20) // In SP\n    .setCancelable(false)\n    .setPositiveButton(android.R.string.ok) {\n        // Your action\n    }\n    .setNegativeButton(android.R.string.cancel) {\n        // Your action\n    }\n    .setNeutralButton(\"Neutral\")\n    .setRoundedCorners(false) // Default value is true\n    .setBackgroundColor(Color.BLACK) // Your custom background color\n    .setButtonsColorRes(R.color.colorAccent) // You can use dialogSheetAccent style attribute instead\n    .setNeutralButtonColor(Color.WHITE)\n    .show()\n```\n\n### Creating the dialog using the new style\n\nSimply use the new _DialogSheet2_ class:\n\n```java\nval dialogSheet = DialogSheet2(this)\n    ...\n    ...\n    .show()\n```\n\nOr add a new boolean-type argument to the dialog constructor:\n\n```java\nval dialogSheet = DialogSheet2(this, true)\n    ...\n    ...\n    .show()\n```\n\n### Colorize buttons\n\nYou can do it programmatically\n\n```java\n.setButtonsColorRes(R.color.colorPrimary)\n```\n\n```java\n.setPositiveButtonColorRes(R.color.colorPrimary)\n.setNegativeButtonColorRes(R.color.colorNegative)\n.setNeutralButtonColorRes(R.color.colorNeutral)\n```\n\nOr by adding this atribute to your main app theme\n\n```xml\n\u003citem name=\"dialogSheetAccent\"\u003e@color/colorAccent\u003c/item\u003e\n```\n\n### Customize corner radius\n\nSimply override this dimen with your desired size\n\n```xml\n\u003cdimen name=\"dialog_sheet_corner_radius\"\u003e16dp\u003c/dimen\u003e\n```\n\n### Adding a custom view:\n \n  - Via inflated view:\n  \n  ```java\nval view = View.inflate(context, R.layout.custom_dialog_view, null)\ndialogSheet.setView(view)\n  ```\n  \n  - Via layout resource:\n \n ```java\ndialogSheet.setView(R.layout.custom_dialog_view)\n\n// Access dialog custom inflated view\nval inflatedView = dialogSheet.getInflatedView()\nval button = inflatedView.findViewById(R.id.customButton)\n...\n ```\n\n### Custom resources:\n\nOverride it if you want :P\n\n```xml\n\u003cdimen name=\"dialog_sheet_corner_radius\"\u003e16dp\u003c/dimen\u003e\n\u003cdimen name=\"dialog_sheet_icon_size\"\u003e56dp\u003c/dimen\u003e\n\u003cdimen name=\"dialog_sheet_v2_icon_size\"\u003e60dp\u003c/dimen\u003e\n\u003cdimen name=\"dialog_sheet_button_text_size\"\u003e15sp\u003c/dimen\u003e\n\u003cdimen name=\"dialog_sheet_landscape_width\"\u003e400dp\u003c/dimen\u003e\n```\n\n---\n\u003eSee the *sample project* to clarify any queries you may have.\n\n---\n\n## License\n\n```\nThe MIT License (MIT)\n\nCopyright (c) 2017 Marcos Calvo García\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```\n\n","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcoscgdev%2FDialogSheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcoscgdev%2FDialogSheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcoscgdev%2FDialogSheet/lists"}