Slide 50
Slide 50 text
class LoginView @JvmOverloads constructor(context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0) : LinearLayout(context, attrs, defStyleAttr) {
var email: String? = null
get() = login_email.text.toString()
var password: String? = null
get() = login_password.text.toString()
var error: String? = null
set(value) { login_error.text = value }
init {
(getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE)
as LayoutInflater).inflate(R.layout.view_login, this, true)
}
}
LoginView.kt