I am compiling and running to a Nexus 7 device and not the emulator because the emulator runs very slowly on my macbook.
Here is my code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="@string/hello" />
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/button_send"/>
</LinearLayout>
I am following along with a book and I have no idea what I am doing wrong. I am using the ADT eclipse ide. Any ideas? The text is there but the button doesn’t show up, when I add a button in the graphical view it seems to work when it injects the code.
Your TextView fills parent. So there it no space left for a button.
Change:
to: