hide password label if password is empty

fix #295
This commit is contained in:
Mohamed 2017-11-19 12:27:31 +01:00
parent b2839eb0a1
commit c1db901fea
2 changed files with 10 additions and 0 deletions

View file

@ -199,6 +199,15 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound {
return@executeApiAsync return@executeApiAsync
} }
if (entry.password.isEmpty()) {
crypto_password_show.visibility = View.GONE
crypto_password_show_label.visibility = View.GONE
} else {
crypto_password_show.visibility = View.VISIBLE
crypto_password_show_label.visibility = View.VISIBLE
crypto_password_show.typeface = monoTypeface
crypto_password_show.text = entry.password
}
crypto_password_show.typeface = monoTypeface crypto_password_show.typeface = monoTypeface
crypto_password_show.text = entry.password crypto_password_show.text = entry.password

View file

@ -67,6 +67,7 @@
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<TextView <TextView
android:id="@+id/crypto_password_show_label"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textStyle="bold" android:textStyle="bold"