{"id":21130034,"url":"https://github.com/maksim88/PasswordEditText","last_synced_at":"2025-07-09T01:32:06.792Z","repository":{"id":201602628,"uuid":"49772252","full_name":"maksim88/PasswordEditText","owner":"maksim88","description":"A custom EditText with a switchable icon which shows or hides the password","archived":false,"fork":false,"pushed_at":"2017-03-31T16:07:46.000Z","size":6965,"stargazers_count":434,"open_issues_count":1,"forks_count":71,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-11-20T05:32:16.819Z","etag":null,"topics":["android","android-library","material","password"],"latest_commit_sha":null,"homepage":"http://maksim88.github.io/PasswordEditText/","language":"Java","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/maksim88.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-01-16T12:20:39.000Z","updated_at":"2024-09-25T13:36:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"31ef6b85-638f-4991-9de3-371955e62fb3","html_url":"https://github.com/maksim88/PasswordEditText","commit_stats":null,"previous_names":["maksim88/passwordedittext"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/maksim88/PasswordEditText","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maksim88%2FPasswordEditText","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maksim88%2FPasswordEditText/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maksim88%2FPasswordEditText/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maksim88%2FPasswordEditText/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maksim88","download_url":"https://codeload.github.com/maksim88/PasswordEditText/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maksim88%2FPasswordEditText/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264375345,"owners_count":23598362,"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","android-library","material","password"],"created_at":"2024-11-20T05:32:12.895Z","updated_at":"2025-07-09T01:32:06.438Z","avatar_url":"https://github.com/maksim88.png","language":"Java","funding_links":[],"categories":["Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Password%20EditText-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/3048)\n [ ![Download](https://api.bintray.com/packages/maksim88/PasswordEditText/PasswordEditText/images/download.svg) ](https://bintray.com/maksim88/PasswordEditText/PasswordEditText/_latestVersion)\n [![](https://jitpack.io/v/maksim88/PasswordEditText.svg)](https://jitpack.io/#maksim88/PasswordEditText)\n\nDeprecated\n===========\nThis library is deprecated now as there is an official way to use the password toggle with the `TextInputLayout` (inside the support library starting with version `24.2.0`).\n```\n\u003candroid.support.design.widget.TextInputLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        app:passwordToggleEnabled=\"true\"\u003e\n\n        \u003candroid.support.design.widget.TextInputEditText\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:inputType=\"textPassword\"/\u003e\n\u003c/android.support.design.widget.TextInputLayout\n```\nFor more information check the official [docs](https://developer.android.com/reference/android/support/design/widget/TextInputLayout.html#attr_android.support.design:passwordToggleEnabled).\n\nPassword EditText\n============\n\nA simple extension to the standard Android EditText which shows an icon on the right side of the field and lets the user toggle the visibility of the password he puts in.\n\n\nNOTE\n--------\nSupport-library versions `24.2.0` and upwards now have built-in functionality to show an eye icon and toggle password visibility (For more info see [docs](https://developer.android.com/reference/android/support/design/widget/TextInputLayout.html#attr_android.support.design:passwordToggleEnabled)).\nYou can nevertheless still use this lib, maybe because you want some of the features that the built-in approach does not have.\n\n\nHow does it look like?\n--------\n\n![alt tag](https://raw.github.com/maksim88/PasswordEditText/master/media/screenshot.png)\n\nUsage\n--------\nFor a complete sample you can check out the sample project provided within.\n\nIn short:\nJust include the `PasswordEditText` instead of the standard EditText and you are good to go.\n\n```xml\n\u003ccom.maksim88.passwordedittext.PasswordEditText\n            android:id=\"@+id/input_password\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:inputType=\"textPassword\"\n            android:hint=\"Password\" /\u003e\n```\n\nYou can also wrap `PasswordEditText` inside a `TextInputLayout` to get a material design moving label on top:\n\n```xml\n\u003candroid.support.design.widget.TextInputLayout\n        android:id=\"@+id/input_layout_password\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\u003e\n\n        \u003ccom.maksim88.passwordedittext.PasswordEditText\n            android:id=\"@+id/input_password\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:inputType=\"textPassword\"\n            android:hint=\"Password\" /\u003e\n    \u003c/android.support.design.widget.TextInputLayout\u003e\n\n```\nNote: be sure to include the design library to use `TextInputLayout`. (for more details see `sample`)\n\n\nYou can also use `TextInputLayout` to achieve an even prettier `setError()` dialog using `setErrorEnabled(true)` on the outer `TextInputLayout`\nand then calling `setError()` on it. This underlines the text and shows an error message underneath the text.\n\n\nCustomize\n--------\n\nYou can add your own custom icons which are shown on the right side of the `EditText`.\n\nDo this by first adding the custom namespace to your root layout, e.g.:\n```xml\n\u003cLinearLayout\n    [...]\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    [...]\u003e\n\u003c/Linearlayout\u003e\n```\n\nAfter that you can add the icons with the attributes `app:pet_iconShow` and `app:pet_iconHide`:\n\n```xml\n\u003ccom.maksim88.passwordedittext.PasswordEditText\n    [...]\n    app:pet_iconShow=\"@drawable/...\"\n    app:pet_iconHide=\"@drawable/...\"\n    [...]\n/\u003e\n```\n\nYou can also set toggle the monospace Font inside the `PasswordEditTexts` with `app:pet_nonMonospaceFont`:\n\n```xml\n\u003ccom.maksim88.passwordedittext.PasswordEditText\n    [...]\n    app:pet_nonMonospaceFont=\"true\"\n    [...]\n/\u003e\n```\n\nAnother customization is to just toggle the visibility of the password when the icon is hovered with `app:pet_hoverShowsPw`:\n\n```xml\n\u003ccom.maksim88.passwordedittext.PasswordEditText\n    [...]\n    app:pet_hoverShowsPw=\"true\"\n    [...]\n/\u003e\n```\n\nIf you do not like the alpha, that is set to all the icons, you can disable it using `app:pet_disableIconAlpha`\n\nNOTE: alpha values are taken from the material design guidelines (https://www.google.com/design/spec/components/text-fields.html#text-fields-password-input)\n\n```xml\n\u003ccom.maksim88.passwordedittext.PasswordEditText\n    [...]\n    app:pet_disableIconAlpha=\"true\"\n    [...]\n/\u003e\n```\n\n\nFor a working example of the different customizations check out the `activity_main.xml` inside the `sample` project.\n\nDownload\n--------\n\nThe library is available from `jcenter()`, so all you need to do is include it in your apps `build.gradle`:\n\n```groovy\ndependencies {\n          compile 'com.maksim88:PasswordEditText:v0.9'\n  }\n```\n\n\nAlternatively you can use `jitpack.io`:\nMore info here: https://jitpack.io/#maksim88/PasswordEditText\n\n\nQuestions?\n--------\nIf you have any questions feel free to open a github issue with a 'question' label\n\n\nLicense\n--------\nLicensed under the MIT license. See [LICENSE](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaksim88%2FPasswordEditText","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaksim88%2FPasswordEditText","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaksim88%2FPasswordEditText/lists"}