• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Problem with EditText

Fischer

Lurker
Hello everybody I am now beginning to tinker with Android, and I have a problem that is much more simple could not understand why this happening, so come to this problem: The thing is I'm trying to create a text field, but what happens is that I can not visualize it in the emulator and did not understand why because I think it has nothing wrong.

I will show you the code below:
main.xml

Code:
[FONT=monospace][COLOR=#009900][COLOR=#3F7F7F]<?xml[/COLOR] [COLOR=#7F007F]version[/COLOR]=[COLOR=#2A00FF]"1.0"[/COLOR] [COLOR=#7F007F]encoding[/COLOR]=[COLOR=#2A00FF]"UTF-8"[/COLOR][COLOR=#ddbb00]?>[/COLOR][/COLOR]
[COLOR=#009900][COLOR=#3F7F7F]<LinearLayout[/COLOR] [COLOR=#7F007F]xmlns:android[/COLOR]=[COLOR=#2A00FF]"http://schemas.android.com/apk/res/android"[/COLOR]
    [COLOR=#7F007F]android:orientation[/COLOR]=[COLOR=#2A00FF]"vertical"[/COLOR]
    [COLOR=#7F007F]android:layout_width[/COLOR]=[COLOR=#2A00FF]"fill_parent"[/COLOR]
    [COLOR=#7F007F]android:layout_height[/COLOR]=[COLOR=#2A00FF]"fill_parent"[/COLOR][COLOR=#ddbb00]>[/COLOR][/COLOR]" 

    [COLOR=#009900][COLOR=#3F7F7F]<EditText[/COLOR]
    [COLOR=#7F007F]android:layout_width[/COLOR]=[COLOR=#2A00FF]"fill_parent"[/COLOR]
    [COLOR=#7F007F]android:layout_height[/COLOR]=[COLOR=#2A00FF]"wrap_content"[/COLOR]
    [COLOR=#7F007F]android:hint[/COLOR]=[COLOR=#2A00FF]"@string/cptext"[/COLOR][COLOR=#ddbb00]/>[/COLOR][/COLOR]
[COLOR=#009900][COLOR=#3F7F7F]</LinearLayout[COLOR=#ddbb00]>[/COLOR][/COLOR][/COLOR][/FONT]
strings.xml

Code:
[FONT=monospace][COLOR=#009900][COLOR=#3F7F7F]<?xml[/COLOR] [COLOR=#7F007F]version[/COLOR]=[COLOR=#2A00FF]"1.0"[/COLOR] [COLOR=#7F007F]encoding[/COLOR]=[COLOR=#2A00FF]"UTF-8"[/COLOR][COLOR=#ddbb00]?>[/COLOR][/COLOR]
[COLOR=#009900][COLOR=#3F7F7F]<resources[COLOR=#ddbb00]>[/COLOR][/COLOR][/COLOR]
    [COLOR=#009900][COLOR=#3F7F7F]<string[/COLOR] [COLOR=#7F007F]name[/COLOR]=[COLOR=#2A00FF]"app_name"[/COLOR][COLOR=#ddbb00]>[/COLOR][/COLOR]HelloAndroid[COLOR=#009900][COLOR=#3F7F7F]</string[COLOR=#ddbb00]>[/COLOR][/COLOR][/COLOR]
    [COLOR=#009900][COLOR=#3F7F7F]<string[/COLOR] [COLOR=#7F007F]name[/COLOR]=[COLOR=#2A00FF]"cptexto"[/COLOR][COLOR=#ddbb00]>[/COLOR][/COLOR]Digite o Texto[COLOR=#009900][COLOR=#3F7F7F]</string[COLOR=#ddbb00]>[/COLOR][/COLOR][/COLOR]
[COLOR=#009900][COLOR=#3F7F7F]</resources[COLOR=#ddbb00]>[/COLOR][/COLOR][/COLOR][/FONT]
I hope you can help me. I await answers.
 
If that is code snapped directly from your code, you are either missing an "o" or having an unwanted "o" in the string resource named cptext(o)...
 
Back
Top Bottom