When I tried to hard code a string starts with @
as the value for android:text
attribute, eclipse says
error: Error: No resource type specified (at 'text' with value '@dmin123').
how can I avoid this?
<EditText android:id="@+id/password_input"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:singleLine="true" android:fadingEdge="horizontal"
android:password="true" android:text="@dmin123"/>
Try this to show @ in your edit text :
android:text="\@dmin123"
You need to escape @ symbol. try this: android:text="\@dmin123"
Please try this,
android:text="\@dmin123"/>
you need to add forward '/' before the '@' character. Just like Escape Sequence in C Language. I have tried it in my code & it is working fine. Showing me Command with @ in text.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With