> For the complete documentation index, see [llms.txt](https://sagar-r-kothari.gitbook.io/blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sagar-r-kothari.gitbook.io/blog/_posts/2021-01-24-android-kotlin-showhidepassword.md).

# How do I show or hide password?

```
binding.showPasswordImageView.setOnClickListener {
    val type = if (binding.textInputEditPassword.inputType != 144) {
        144 // Visible Password
    } else {
        129 // Invisible Password
    }
    binding.textInputEditPassword.inputType = type
}
```
