Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Cannot trigger onClick event from Forgot? button #175

Open
eliaszkubala opened this issue May 11, 2018 · 1 comment
Open

Cannot trigger onClick event from Forgot? button #175

eliaszkubala opened this issue May 11, 2018 · 1 comment

Comments

@eliaszkubala
Copy link

eliaszkubala commented May 11, 2018

"Forgot?" textView is unclickable. I even tried to override the default click function. Below is code which I am using for enable pin code.

Intent intent = new Intent(MainActivity.this, CustomPinActivity.
startActivityForResult(intent, REQUEST_CODE_ENABLE);
lastResume = System.currentTimeMillis();

My CustomPinActivity below

class CustomPinActivity : AppLockActivity() {


override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
}

override fun onResume() {
    super.onResume()
    val view = this.findViewById<TypefaceTextView>(R.id.pin_code_forgot_textview)
    view.visibility = View.GONE
    view.setOnClickListener({
        showForgotDialog()
    })
}

override fun onPinSuccess(attempts: Int) {

}

override fun onPinFailure(attempts: Int) {

}

override fun showForgotDialog() {
    finish()
    SplashActivity.clearStart(this)
}

}

Xiaomi Mi5

@eliaszkubala
Copy link
Author

eliaszkubala commented May 14, 2018

Okay, the answer is Don't use Kotlin for extends AppLockActivity.

You can close this ticket. THANKS FOR THIS LIB BRO!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant