Reply
Old 01-02-2012, 01:37 AM   #1 (permalink)
 
Status: Senior Member
Posts: 151,118



Default What is wrong with this code? How do I fix it?

So I typed up this code from the book 'Android Apps for Absolute Beginners' by Wallace Jackson, and it says I have errors in several lines. The code is below, and copied from the book, and those that are marked as erratic are followed by a double slash and the error message:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<TextView
android:id="@+id/label
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Type here:"/> //[I18N] Hardcoded string "Type here:", should use @string resource

<EditText //This text field does not specify an inputType or a hint
android:id="@+id/entry"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below=@+id/label"/>

<Button
android:id="@+id/ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/entry"
android:layout_alignParentRight="true"
android:layout_marginLeft="10dip"
android:text="OK"/> //[I18N] Hardcoded string "OK", should use @string resource

<Button
android:id="@+id/cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/entry"
android:layout_toLeftOf="@+id/ok"
android:layout_alignTop="@+id/ok"
android:text="Cancel"/> //[I18N] Hardcoded string "Cancel" should use @string rescource

</RelativeLayout>

Unknown_User is offline   Reply With Quote

Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
entered wrong code into code entry mode. need a code to reactivate? Edge Coding 1 04-18-2013 03:06 AM
i put wrong zip code in adsense account and pin generated in wrong pin address rest address is correct? PC_4Ever Coding 0 02-21-2013 06:04 PM
there is something wrong with my html code for a link and i have no idea what's wrong with it.? StevenLu Html Code/ Html Codes 1 01-15-2013 11:05 PM
I figured out what part of my code is wrong, but not why it's wrong - help? C++? Unknown_User Coding 0 02-09-2012 07:06 AM
what is wrong with this javaScript Code is too short to be wrong... gemnTenna JavaScript 0 09-18-2011 01:13 AM