{"id":13642319,"url":"https://github.com/ayaremin/panter-dialog","last_synced_at":"2025-04-20T16:31:44.739Z","repository":{"id":171406118,"uuid":"73961448","full_name":"ayaremin/panter-dialog","owner":"ayaremin","description":"Panter Dialog is an stylish android library that helps users add cool features like adding header and header logos","archived":false,"fork":false,"pushed_at":"2017-09-29T10:00:06.000Z","size":190,"stargazers_count":118,"open_issues_count":3,"forks_count":34,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-04T00:06:02.368Z","etag":null,"topics":["android","dialog","panter-dialog","ui","ui-components"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ayaremin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-11-16T21:11:10.000Z","updated_at":"2024-07-05T01:19:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0478e39-e14c-49a5-ba8a-66769416a2dd","html_url":"https://github.com/ayaremin/panter-dialog","commit_stats":null,"previous_names":["ayaremin/panter-dialog","kngfrhzs/panter-dialog"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayaremin%2Fpanter-dialog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayaremin%2Fpanter-dialog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayaremin%2Fpanter-dialog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayaremin%2Fpanter-dialog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ayaremin","download_url":"https://codeload.github.com/ayaremin/panter-dialog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223832963,"owners_count":17210754,"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","dialog","panter-dialog","ui","ui-components"],"created_at":"2024-08-02T01:01:29.850Z","updated_at":"2025-04-20T16:31:44.724Z","avatar_url":"https://github.com/ayaremin.png","language":"Java","funding_links":[],"categories":["对话框"],"sub_categories":[],"readme":"# PanterDialog\r\n\r\n[![Build Status](https://travis-ci.org/kngfrhzs/panter-dialog.svg?branch=master)](https://travis-ci.org/kngfrhzs/panter-dialog)\r\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Panter%20Dialog-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/4678)\r\n[![Join the chat at https://gitter.im/panterdialog/Lobby](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/panterdialog/Lobby)\r\n\r\n![Logo](http://i.imgur.com/FMlRH4i.png)\r\n\r\n![Screenshots](http://i.imgur.com/Pm6aAuW.png)\r\n\r\n## Installation\r\nAdd this into your build.gradle dependencies section.\r\n```\r\ncompile 'com.eminayar.panterdialog:panter-dialog:0.0.2.1'\r\n```\r\n\r\n## Sample Usages\r\n\r\nYou can check sample application to see how to create PanterDialogs with simply [sample module] (https://github.com/kngfrhzs/panter-dialog/tree/master/app).\r\n\r\nThere are 3 types of dialog for now. Default dialog type is `DialogType.Standart`. So if you don't pass this value it will create a standart text dialog. Otherwise you can create `Input Dialog` by just calling `setDialogType(DialogType.INPUT)` or `Single Choice List Dialog` by just calling `setDialogType(DialogType.SINGLECHOICE)`.\r\n\r\n#### Dialog with Header and Logo\r\n````java\r\nnew PanterDialog(this)\r\n       .setHeaderBackground(R.drawable.pattern_bg_orange)\r\n       .setHeaderLogo(R.drawable.sample_logo)\r\n       .setPositive(\"I GOT IT\")// You can pass also View.OnClickListener as second param\r\n       .setNegative(\"DISMISS\")\r\n       .setMessage(R.string.lorem_ipsum)\r\n       .isCancelable(false)\r\n       .show();\r\n\r\n````\r\n\r\n#### Dialog with Header and Title\r\n````java\r\nnew PanterDialog(this)\r\n       .setHeaderBackground(R.drawable.pattern_bg_orange)\r\n       .setTitle(\"Sample Title\")\r\n       .setPositive(\"I GOT IT\")// You can pass also View.OnClickListener as second param\r\n       .setNegative(\"DISMISS\")\r\n       .setMessage(R.string.lorem_ipsum)\r\n       .isCancelable(false)\r\n       .show();\r\n\r\n````\r\n\r\n#### Dialog with Only Header\r\n````java\r\nnew PanterDialog(this)\r\n       .setHeaderBackground(R.drawable.pattern_bg_orange)\r\n       .setPositive(\"I GOT IT\")// You can pass also View.OnClickListener as second param\r\n       .setNegative(\"DISMISS\")\r\n       .setMessage(R.string.lorem_ipsum)\r\n       .isCancelable(false)\r\n       .show();\r\n\r\n````\r\n\r\n#### Input Dialog\r\n````java\r\nnew PanterDialog(this)\r\n        .setHeaderBackground(R.drawable.pattern_bg_orange)\r\n        .setHeaderLogo(R.drawable.sample_logo)\r\n        .setDialogType(DialogType.INPUT)\r\n        .isCancelable(false)\r\n        .input(\"THIS IS HINT FOR INPUT AREA YOU CAN WRITE HERE ANY LONGER TEXTS\",\r\n                \"ERROR MESSAGE IF USER PUT EMPTY INPUT\", new\r\n                            OnTextInputConfirmListener() {\r\n                            @Override\r\n                            public void onTextInputConfirmed(String text) {\r\n                                Toast.makeText(MainActivity.this, text, Toast.LENGTH_LONG).show();\r\n                            }\r\n                        })\r\n        .show();\r\n\r\n\r\n````\r\n\r\n#### Single Choice List Dialog\r\n\r\nWhile passing your values to dialog you can pass them as `@ArrayRes , String[] or ArrayList\u003cString\u003e`.There are 3 built-in method for them\r\n````java\r\nnew PanterDialog(this)\r\n          .setHeaderBackground(R.drawable.pattern_bg_blue)\r\n          .setHeaderLogo(R.drawable.sample_logo)\r\n          .setDialogType(DialogType.SINGLECHOICE)\r\n          .isCancelable(false)\r\n          .items(R.array.sample_array, new OnSingleCallbackConfirmListener() {\r\n              @Override\r\n              public void onSingleCallbackConfirmed(PanterDialog dialog, int pos, String text) {\r\n                  Toast.makeText(MainActivity.this, \"position : \" + String.valueOf(pos) +\r\n                                  \" value = \" + text,\r\n                          Toast.LENGTH_LONG).show();\r\n              }\r\n          })\r\n          .show();\r\n\r\n\r\n````\r\n#### Animation\r\n\r\nThere are 3 type of pre-defined animation you can use : `POP`, `SLIDE` and `SIDE`\r\n\r\n##### Pop Animation\r\n\r\nYou can add this animation to your dialog by using `.withAnimation(Animation.POP)`\r\n\r\n##### Side Animation\r\n\r\nThis animation let dialog enter screen from left and exit from right. You can add this animation to your dialog by using `.withAnimation(Animation.SIDE)`\r\n\r\n##### Slide Animation\r\n\r\nThis animation let dialog enter screen from bottom and exit from bottom. You can add this animation to your dialog by using `.withAnimation(Animation.SLIDE)`\r\n\r\n## Contribution\r\n\r\nOpen to any kind of new idea, development suggestion or bug fixing. And If anyone want to contribute , I will appreciate. It is enough to just create a new PR that explaining problem and solution.\r\n\r\n###License\r\n```\r\nCopyright 2016 Muhammed Emin AYAR\r\n\r\nThe MIT License\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in\r\nall copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\nTHE SOFTWARE.\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayaremin%2Fpanter-dialog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayaremin%2Fpanter-dialog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayaremin%2Fpanter-dialog/lists"}