Advertise With Us | Place Your Link Ad Here For Only 45$ Per 3 Months
Reply
Old 01-02-2012, 12:37 AM   #1 (permalink)
 
Join Date: Nov 2011
Posts: 151,493



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
Sponsored Links

Reply

Bookmarks

Thread Tools
Display Modes