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" /> + + + + +