{"id":37043616,"url":"https://github.com/invissvenska/modalbottomsheetdialog","last_synced_at":"2026-01-14T05:01:06.650Z","repository":{"id":45426557,"uuid":"270312582","full_name":"invissvenska/ModalBottomSheetDialog","owner":"invissvenska","description":"Another BottomSheetDialog for Android","archived":false,"fork":false,"pushed_at":"2021-12-15T12:13:56.000Z","size":5883,"stargazers_count":72,"open_issues_count":0,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-11-27T13:44:39.830Z","etag":null,"topics":["android","android-library","bottomsheetdialog","ui-widget"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/invissvenska.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":"2020-06-07T13:19:20.000Z","updated_at":"2025-11-03T11:09:51.000Z","dependencies_parsed_at":"2022-08-31T15:31:37.814Z","dependency_job_id":null,"html_url":"https://github.com/invissvenska/ModalBottomSheetDialog","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/invissvenska/ModalBottomSheetDialog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invissvenska%2FModalBottomSheetDialog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invissvenska%2FModalBottomSheetDialog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invissvenska%2FModalBottomSheetDialog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invissvenska%2FModalBottomSheetDialog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/invissvenska","download_url":"https://codeload.github.com/invissvenska/ModalBottomSheetDialog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invissvenska%2FModalBottomSheetDialog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28410078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"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":["android","android-library","bottomsheetdialog","ui-widget"],"created_at":"2026-01-14T05:01:05.672Z","updated_at":"2026-01-14T05:01:06.610Z","avatar_url":"https://github.com/invissvenska.png","language":"Java","funding_links":["https://www.paypal.com/paypalme/svenvandentweel/3"],"categories":[],"sub_categories":[],"readme":"# ModalBottomSheetDialog\n[![API](https://img.shields.io/badge/API-16%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=16) \n[![](https://jitpack.io/v/invissvenska/ModalBottomSheetDialog.svg)](https://jitpack.io/#invissvenska/ModalBottomSheetDialog) \n[![Android Arsenal]( https://img.shields.io/badge/Android%20Arsenal-ModalBottomSheetDialog-green.svg?style=flat )]( https://android-arsenal.com/details/1/8133 ) \n\u003ca href=\"https://github.com/invissvenska/ModalBottomSheetDialog/actions\"\u003e\u003cimg alt=\"Build Status\" src=\"https://github.com/invissvenska/ModalBottomSheetDialog/workflows/Android-Library%20CI/badge.svg\"/\u003e\u003c/a\u003e \n\u003cspan class=\"badge-buymeacoffee\"\u003e\u003ca href=\"https://www.paypal.com/paypalme/svenvandentweel/3\" title=\"Donate to this project using Buy Me A Coffee\"\u003e\u003cimg src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /\u003e\u003c/a\u003e\u003c/span\u003e  \n\n\u003cimg src=\"https://raw.githubusercontent.com/invissvenska/ModalBottomSheetDialog/master/media/animated.gif\" align=\"right\" width=\"32%\"\u003e\n\n## Prerequisites\n\nAdd this in your root `build.gradle` file (**not** your module `build.gradle` file):\n\n```gradle\nallprojects {\n    repositories {\n        ...\n        maven { url \"https://jitpack.io\" }\n    }\n}\n```\n\n## Dependency\n\nAdd this to your module's `build.gradle` file (make sure the version matches the JitPack badge above):\n\n```gradle\ndependencies {\n    ...\n    implementation 'com.github.invissvenska:ModalBottomSheetDialog:VERSION'\n}\n```\n\n## Configuration\n\nImplement the ModalBottomSheetDialog Listener interface on your Activity or Fragment:\n\nImplements listener in Activity\n```java\npublic class MainActivity extends AppCompatActivity implements ModalBottomSheetDialog.Listener {\n    // some code\n}\n```\n\nImplements listener in Fragment\n```java\npublic class Fragment implements ModalBottomSheetDialog.Listener {\n    // some code\n}\n```\n\nOverride onItemSelected method\n```java\n@Override\npublic void onItemSelected(String tag, Item item) {\n    Toast.makeText(getApplicationContext(), \"Tag: \" + tag + \", clicked on: \" + item.getTitle(), \n        Toast.LENGTH_SHORT).show();\n}\n```\n\nCreate the dialog\n```java\nnew ModalBottomSheetDialog.Builder()\n    .setHeader(String title) // optional\n    .setHeaderLayout(@LayoutRes int layoutResource) // optional (TextView must have id 'header' in layout)\n    .add(@MenuRes int menuResource) // can be used more then once\n    .setItemLayout(@LayoutRes int layoutResource) // optional (TextView with id 'title' or ImageView with id 'icon' must be defined in layout)\n    .setColumns(int columns) // optional (default is 1)\n    .setRoundedModal(boolean roundedModal) // optional (default is false)\n    .show(FragmentManager fragmentManager, String tag);\n```\n\nExtend you theme with on of the DayNight variants to support a dark styled ModalBottomSheetDialog. For example `styles.xml`:\n```xml\n\u003cresources\u003e\n    \u003c!-- Base application theme. --\u003e\n    \u003cstyle name=\"AppTheme\" parent=\"Theme.MaterialComponents.DayNight.DarkActionBar\"\u003e\n        \u003c!-- Customize your theme here. --\u003e\n        \u003citem name=\"colorPrimary\"\u003e@color/colorPrimary\u003c/item\u003e\n        \u003citem name=\"colorPrimaryDark\"\u003e@color/colorPrimaryDark\u003c/item\u003e\n        \u003citem name=\"colorAccent\"\u003e@color/colorAccent\u003c/item\u003e\n    \u003c/style\u003e\n\n    \u003c!-- other style declarations --\u003e\n\n\u003c/resources\u003e\n```\n\n## Usage\n\n### Fragment\n\nWhen you use the ModalBottomSheetDialog in a Fragment and want to show the bottom dialog:\n```java\ndialog.show(getChildFragmentManager(), \"WithHeader\");\n```\n\n### Activity\n\nWhen you use the ModalBottomSheetDialog in an Activity and want to show the bottom dialog:\n```java\ndialog.show(getSupportFragmentManager(), \"WithHeader\");\n```\n\n### Options\n\nTo create a ModalBottomSheetDialog and display it later in code:\n``` java\nModalBottomSheetDialog dialog = new ModalBottomSheetDialog.Builder()\n    .setHeader(\"Title of modal\")\n    .add(R.menu.options)\n    .build();\n// some other code in between\ndialog.show(FragmentManager fragmentManager, \"WithHeader\");\n```\n\nTo display a ModalBottomSheetDialog directly:\n``` java\nnew ModalBottomSheetDialog.Builder()\n    .setHeader(\"Title of modal\")\n    .add(R.menu.options)\n    .show(FragmentManager fragmentManager, \"WithHeader\");\n```\n\nTo display a ModalBottomSheetDialog with items from multiple menu resources:\n``` java\nnew ModalBottomSheetDialog.Builder()\n    .add(R.menu.options)\n    .add(R.menu.options)\n    .show(FragmentManager fragmentManager, \"WithoutHeader\");\n```\n\nTo display a ModalBottomSheetDialog in a grid layout:\n``` java\nnew ModalBottomSheetDialog.Builder()\n    .setHeader(\"Grid bottom layout\")\n    .add(R.menu.lot_of_options)\n    .setColumns(3)\n    .show(FragmentManager fragmentManager, \"Grid Layout\");\n```\n\nTo display a ModalBottomSheetDialog with custom layout:\n``` java\nnew ModalBottomSheetDialog.Builder()\n    .setHeader(\"Custom title and item layouts\")\n    .setHeaderLayout(R.layout.alternate_bottom_sheet_fragment_header)\n    .add(R.menu.lot_of_options)\n    .setItemLayout(R.layout.alternate_bottom_sheet_fragment_item)\n    .setColumns(3)\n    .show(FragmentManager fragmentManager, \"Custom Layout\");\n```\n\nTo display a ModalBottomSheetDialog with rounded corners:\n``` java\nnew ModalBottomSheetDialog.Builder()\n    .setHeader(\"Rounded bottom layout\")\n    .add(R.menu.lot_of_options)\n    .setRoundedModal(true)\n    .show(FragmentManager fragmentManager, \"Rounded Layout\");\n```\n\nIf you want to close a ModalBottomSheetDialog:\n``` java\ndialog.dismiss();\n```\n\n## Screenshots\n\n**Please click the image below to enlarge.**\n\n\u003cimg src=\"https://raw.githubusercontent.com/invissvenska/ModalBottomSheetDialog/master/media/collage.png\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvissvenska%2Fmodalbottomsheetdialog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finvissvenska%2Fmodalbottomsheetdialog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvissvenska%2Fmodalbottomsheetdialog/lists"}