Wex
Wex

Reputation: 1

display text from plain text in textView on button click

I want that after pressing the button with the "create" id, the text from the textview that was manually entered in plaintext is displayed

I have plaintext and button.

In plaintext I write "test" or something like this and then I click button, this text should be displayed below in textview

Upvotes: -3

Views: 109

Answers (1)

Top4o
Top4o

Reputation: 664

On button press (the click listener) take the text in the plaintext (input or edittext view i guess):

val plainText = yourEditTextView.text.toString()

and to set the text in our textView:

textView.text = plainText

This should do the job.

Upvotes: 0

Related Questions