Reputation: 2420
For some reason, my textview Add a base
doesn't show up when I launch the app on my phone. I have no idea why, 'cause it is displayed on Android studio :O
Upvotes: 0
Views: 36
Reputation: 252
tools:text="YOUR TEXT" can be used for your design and preview purpose. If you add any text as a tools:text app will not use this text as that is not the actual text that should be rendered on the app
So instead of this, you should use android:text="YOUR TEXT"
Upvotes: 1
Reputation: 20634
Replace tools:text="@string/add_base"
with android:text="@string/add_base"
Attributes in the tools
namespace are shown only when designing layouts. When you build your app, the build tools remove these attributes so there is no effect on your APK size or runtime behavior.
Reference: https://developer.android.com/studio/write/tool-attributes
Upvotes: 2