0

When am using

android:text="Lorem Ipsum" 

the text is just showing normally on the textview but when am using

 tools:text="@tools:sample/lorem"

its not showing anything.

I have added the namespace for tools, what might be the problem?

Here is the name space


xmlns:tools="http://schemas.android.com/tools"

Wincelee
  • 71
  • 2
  • 13

1 Answers1

2

tools:text is used only for viewing the sample view of the layout in preview. android:text actually sets the text to the TextView. You need to set the text programmatically by textView.setText("your text") or change tools namespace to android.

Madina Saidova
  • 166
  • 1
  • 11