Ok, so I just purchased the book and have run into the same issues with regard to the outdated version screenshots of the ADT for eclipse. I am running the latest version as of this date and have played around enough to get an emulator working for 4.0. The problem I am having with the Hello World example in chapter one is that the program runs, but the formatting is all off. The Hello world text is not centered as the code directs, the string is on top of the button and I cannot understand why this is. Can someone please explain. I am trying to work with the new relative layout default. Here is what I am looking at:
Code:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="@string/hello_world" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/first_app" />
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/click_button" />
</RelativeLayout>
AVD:
Device: 4.7" WXGA (1280X720: xhdpi)
Target: Android 4.0 - API Level 14
CPU/ABI: ARM (armeabi-v7a)
No Hardware Keyboard
Skin Hardware Controls
Front/Rear Cameras: None
Memory: RAM=512 VM Heap=64
Internal Storage: 200MB
SD Size: 10MB
Emulation Options: Snapshot
I can't insert an image to show the results but if you run the same AVD and code you should see what I am talking about. Any help would be appreciated.