I think you want show a tex in layout but use incorrect way. in android at first you should declare layout like linear,relative ,... and in body of layout you can put all thing such as button ,textview,edittext,... in your case you can use linearlayout and in body of layout put textview and set the text of text of it map as you want like this. if you want to have better code you can put the text in stringMap in values folders strings.xml file. res>values>strins.xml like the code below.
<resources> <string name="app_name">app_name</string> <string name= "title_activity_driver_map" >Map</string> </resources>
and after that you can set the text in textview that you declare in layout like below
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/title_activity_driver_map"/> </LinearLayout>
good luck
LinearLayout, not strings.<string name= "title_activity_driver_map" >Map</string>is not valid here. Cut it from here and paste it in file res/values/strings.xml