Created
April 2, 2020 14:52
-
-
Save fluxtah/fe26fb1df77ece7882df88dc09579e1f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HelloViewImpl(activity: AppCompatActivity) : HelloView { | |
private val greetingTextView: TextView = activity.findViewById(R.id.greeting_text) | |
private val newGreetingButton: Button = activity.findViewById(R.id.new_greeting_button) | |
override fun updateGreetingText(greetingText: String) { | |
greetingTextView.text = greetingText | |
} | |
override fun onShowNewGreetingButtonPressed(onPressed: () -> Unit) = | |
newGreetingButton.setOnClickListener { onPressed() } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment