{"id":19635810,"url":"https://github.com/codepath/android-view-helpers","last_synced_at":"2025-04-28T08:31:05.010Z","repository":{"id":9080469,"uuid":"10854461","full_name":"codepath/android-view-helpers","owner":"codepath","description":"Android View Helpers for Dialogs and more","archived":false,"fork":false,"pushed_at":"2013-06-22T00:36:36.000Z","size":515,"stargazers_count":33,"open_issues_count":0,"forks_count":11,"subscribers_count":9,"default_branch":"master","last_synced_at":"2023-05-10T14:13:27.681Z","etag":null,"topics":[],"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/codepath.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}},"created_at":"2013-06-21T22:53:54.000Z","updated_at":"2022-07-12T11:27:34.000Z","dependencies_parsed_at":"2022-08-25T02:02:22.276Z","dependency_job_id":null,"html_url":"https://github.com/codepath/android-view-helpers","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codepath%2Fandroid-view-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codepath%2Fandroid-view-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codepath%2Fandroid-view-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codepath%2Fandroid-view-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codepath","download_url":"https://codeload.github.com/codepath/android-view-helpers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224102195,"owners_count":17256111,"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-11-11T12:27:06.121Z","updated_at":"2024-11-11T12:27:07.020Z","avatar_url":"https://github.com/codepath.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Android View Helpers\n\nThis library is a collection of simple view helpers to make Android development easier. Right now, this library just has a few helpful classes but they will expand over time.\n\n## Installation\n\nDownload the latest [jar file](https://www.dropbox.com/s/zhxgms8ck0a4wj2/codepath-android-view-helpers-0.1.0.jar) and drag the JAR to your \"libs\" folder.\n\n## SimpleAlertDialog\n\nThis is a simple way to bring up a modal alert dialog within a DialogFragment within a FragmentActivity. The dialog fragment used is the `v4.support` Fragment to support all Android versions.\n\n### Usage\n\nIn apps, you often may want to display an alert asking the user a question or displaying a message\nto the user. Creating an alert to display is easy:\n\n```java\nclass MyActivity extends FragmentActivity {\n\tpublic void showDialog() {\n\t\tSimpleAlertDialog.build(this, \n\t\t\t\"Sure you want to continue?\", new SimpleAlertListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onPositive() {\n\t\t\t\t\t// handle OK\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onNegative() {\n\t\t\t\t\t// handle cancel\n\t\t\t\t}\n\t\t}\n\t   ).show();\n   }\n}\n```\n\nBy default, this will display the following alert:\n\n![AlertDialog](http://i.imgur.com/3xjhVlZ.png)\n\nYou can also adjust the alert to include no buttons, or change the button text. \nTo display just an \"Sure\" button:\n\n```java\nSimpleAlertDialog.build(this, \n\t\"Sure you want to continue?\", \"Sure\", null, new SimpleAlertListener()\n).show();\n```\n\nTo display a \"Yes\" and \"No\" button:\n\n```java\nSimpleAlertDialog.build(this, \n\t\"Sure you want to continue?\", \"Yes\", \"No\", new SimpleAlertListener()\n).show();\n```\n\nYou can also customize the icon in the alert and other properties:\n\n```java\nSimpleAlertDialog alert = SimpleAlertDialog.build(this, \"Confirm?\", new SimpleAlertListener());\nalert.setAlertIcon(R.drawable.ic_some_icon);\nalert.setAlertButtons(\"Yes\", \"No\");\nalert.show();\n```\n\n## SimpleProgressDialog\n\nOften in an application there might be a long running task that requires the UI to be blocked \nsuch as uploading an image. While this isn't the best UI, occassionally this can come up.\n\nCreating an indeterminate modal progress dialog is easy:\n\n```java\nSimpleProgressDialog dialog = SimpleProgressDialog.build(this);\n```\n\nBy default, this will display the following alert:\n\n![ProgressDialog](http://i.imgur.com/rbEV8pM.png)\n\nYou can dismiss the dialog once the task is complete with:\n\n```java\ndialog.dismiss();\n```\n\nYou can also adjust the progress dialog to have a custom message:\n\n```java\nSimpleProgressDialog dialog = SimpleProgressDialog.build(this, \"Uploading...\");\ndialog.show();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodepath%2Fandroid-view-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodepath%2Fandroid-view-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodepath%2Fandroid-view-helpers/lists"}