From 2a58a04e09f6a159895722986663af3c67bd3659 Mon Sep 17 00:00:00 2001 From: Pedro Francisco de Sousa Neto Date: Tue, 19 Jun 2018 16:51:43 -0300 Subject: [PATCH] Criando mais um sample --- .../revealpassword/sample/MainActivity.kt | 4 +++ app/src/main/res/layout/activity_main.xml | 26 ++++++++++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/br/com/redcode/revealpassword/sample/MainActivity.kt b/app/src/main/java/br/com/redcode/revealpassword/sample/MainActivity.kt index b5dad03..24dc0d8 100644 --- a/app/src/main/java/br/com/redcode/revealpassword/sample/MainActivity.kt +++ b/app/src/main/java/br/com/redcode/revealpassword/sample/MainActivity.kt @@ -2,6 +2,7 @@ package br.com.redcode.revealpassword.sample import android.os.Bundle import android.support.v7.app.AppCompatActivity +import br.com.redcode.revealpassword.library.showOrHidePassword import kotlinx.android.synthetic.main.activity_main.* class MainActivity : AppCompatActivity() { @@ -11,6 +12,9 @@ class MainActivity : AppCompatActivity() { setContentView(R.layout.activity_main) editTextWithImageForRevealPassword.changeIcon(android.R.drawable.ic_delete) + editTextWithImageForRevealPassword.changeHint(getString(R.string.app_name)) + + buttonShowHidePassword.setOnClickListener { editTextSampleFunction.showOrHidePassword() } } } diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index dcc0829..7d6ad48 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -11,7 +11,7 @@ + android:text="Default UI component from library" /> + android:text="UI component customized in XML (no kotlin/java references)" /> + android:text="Custom with Kotlin" /> + + + + +