{"id":13571542,"url":"https://github.com/avast/android-styled-dialogs","last_synced_at":"2025-12-17T16:59:57.486Z","repository":{"id":8634309,"uuid":"10281119","full_name":"avast/android-styled-dialogs","owner":"avast","description":"Backport of Material dialogs with easy-to-use API based on DialogFragment","archived":false,"fork":false,"pushed_at":"2019-05-28T09:10:03.000Z","size":1652,"stargazers_count":2146,"open_issues_count":14,"forks_count":450,"subscribers_count":138,"default_branch":"master","last_synced_at":"2025-04-22T03:28:30.300Z","etag":null,"topics":[],"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/avast.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-25T07:35:52.000Z","updated_at":"2025-01-31T10:38:31.000Z","dependencies_parsed_at":"2022-09-26T22:10:19.526Z","dependency_job_id":null,"html_url":"https://github.com/avast/android-styled-dialogs","commit_stats":null,"previous_names":["inmite/android-styled-dialogs"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avast%2Fandroid-styled-dialogs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avast%2Fandroid-styled-dialogs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avast%2Fandroid-styled-dialogs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avast%2Fandroid-styled-dialogs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avast","download_url":"https://codeload.github.com/avast/android-styled-dialogs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254346624,"owners_count":22055808,"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":[],"created_at":"2024-08-01T14:01:03.006Z","updated_at":"2025-12-17T16:59:52.451Z","avatar_url":"https://github.com/avast.png","language":"Java","readme":"# StyledDialogs for Android \n[![Build Status](https://travis-ci.org/avast/android-styled-dialogs.svg?branch=master)](https://travis-ci.org/avast/android-styled-dialogs) [![License](https://img.shields.io/badge/license-Apache%202-green.svg?style=flat)](https://github.com/avast/android-styled-dialogs/blob/master/LICENSE.txt) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-StyledDialogs-green.svg?style=flat)](https://android-arsenal.com/details/1/143) \n\n ![Screenshot of the dialogs](graphics/screenshot-small.png)\n \nDemo app:\n\n\u003ca href=\"https://play.google.com/store/apps/details?id=com.avast.dialogs\"\u003e\u003cimg src=\"http://www.android.com/images/brand/get_it_on_play_logo_small.png\" alt=\"Get it on Google Play\" /\u003e\u003c/a\u003e\n\nFeatures:\n\n - Compatible with **Material Design Guidelines**\n - Same look for **Android 2.2+**\n - Built on top of standard **DialogFragment**\n - Supports stacked buttons, neutral button, callbacks even after rotation\n - Light and dark theme\n - Contains even more specialized dialogs: List, Progress, Time\u0026Date Picker, Custom, ...\n\n## How to include it in your project:\n\n```groovy\ndependencies {\n\tcompile 'com.avast:android-styled-dialogs:2.3.3'\n}\n```    \nHosted in [jcenter](https://bintray.com/avast/android/styled-dialogs/): [ ![Download](https://api.bintray.com/packages/avast/android/styled-dialogs/images/download.svg) ](https://bintray.com/avast/android/styled-dialogs/_latestVersion)\n\n[Looking for Holo dialogs?](https://github.com/inmite/android-styled-dialogs/tree/holo)\n\n## How to style all dialogs:\n\nIt uses standard Material colors, for example like this:\n\n```xml\n\u003cstyle name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar\"\u003e\n        \u003citem name=\"colorPrimary\"\u003e@color/indigo\u003c/item\u003e\n        \u003citem name=\"colorPrimaryDark\"\u003e@color/indigo_dark\u003c/item\u003e\n        \u003citem name=\"colorAccent\"\u003e@color/pink\u003c/item\u003e\n\u003c/style\u003e\n```\n\nFor dark theme, inherit from `Theme.AppCompat`. Or you can force dark theme per individual dialog using `useDarkTheme()` builder method.\nYou can also force light theme per individual dialog using `useLightTheme()` builder method.\n\n## How to create simple dialogs:\n\nEasy:\n\n### Dialog with a simple message only:\n```java\nSimpleDialogFragment.createBuilder(this, getSupportFragmentManager()).setMessage(R.string.message).show();\n```\n\n### Dialog with a title, message and two buttons:\t\n```java\nSimpleDialogFragment.createBuilder(this, getSupportFragmentManager()).setTitle(R.string.title).setMessage(R.string.message).setPositiveButtonText(R.string.positive_button).setNegativeButtonText(R.string.negative_button).show();\n```\n### How to react on button press in your Activity/Fragment:\n\nSimply implement interface `ISimpleDialogListener` in your Activity/Fragment. Listener's callbacks have `requestCode` parameter - you can use it if you have more dialogs in one Activity/Fragment.\n\nFor Fragments use `setTargetFragment()` method in the builder.\n\nIt's not possible to use normal Java callbacks, because they are lost after device rotation.\n\n### How to react on cancelling the dialog:\n\nImplement interface `ISimpleDialogCancelListener` in your Activity/Fragment.\n\n## How to create custom DialogFragments:\n\nExtend `BaseDialogFragment`. \n\nHave a look at [JayneHatDialogFragment](https://github.com/avast/android-styled-dialogs/blob/master/demo/src/main/java/com/avast/dialogs/JayneHatDialogFragment.java) for a practical example.\n\n## Contributing\n\nPull requests are welcomed!\n\nPlease set your Android Studio formatting to [our code style](https://github.com/avast/android-styled-dialogs/blob/master/code-formatting-config.xml).\n\n## Why 'Dialogs'?\n\n\u003cimg src=\"http://img.radio.cz/pictures/osobnosti/cimrman_jarax.jpg\" width=\"70\"  align=\"right\"/\u003e\n\nTheodor Dialogs was a famous Czech painter, uncle of [Jára Cimrman](http://en.wikipedia.org/wiki/J%C3%A1ra_Cimrman). Jára Cimrman was a playwright, philosopher, inventor, teacher, poet, mathematician and more but he lacked painting skills. That's why Theodor was helping him with many projects. Just like Android and this library do.\n\nSee [**our other Czech personalities**](http://inmite.github.io) who help with [#AndroidDev](https://plus.google.com/s/%23AndroidDev).\n","funding_links":[],"categories":["Java","etc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favast%2Fandroid-styled-dialogs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favast%2Fandroid-styled-dialogs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favast%2Fandroid-styled-dialogs/lists"}