Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display @ in TextView

Tags:

android

How To display the Symbols: @ and " in textView in android i'm currently using the code

android:text="@" and
android:text="""

but it shows errors:

1 Exception details are logged in Window > Show View > Error Log The following classes could not be found: - TextView (Change to android.widget.TextView, Fix Build Path, Edit XML)

I also tried to put the value in to the String.But Same result. it showed this error:"error: Error: No resource type specified (at 'atTheRate' with value '@')."

android:text="@string/atTheRate"
like image 989
praveenLal Avatar asked Jan 29 '26 13:01

praveenLal


2 Answers

you may try \u0040 instead of \@

like image 101
kosa Avatar answered Feb 01 '26 02:02

kosa


make it android:text="@" this should work fine but it seems that you missed the = sign for " symbol use escape sequence character like this \" android:text="\""

update

android:text="@string/atTheRate"

the error occur since you don't have a string in your strings.xml resource file with the name of atTheRate

like image 27
confucius Avatar answered Feb 01 '26 03:02

confucius