Hello, I have just decided to try out the Android SDK, so I installed it and now I'm trying to make a simple interface using an XML file for a calculator I've made and that I might port to Android.
Here a first draft of the XML file I want to use:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:lines="3"
android:text="To evaluate an expression, type it below."
/>
<EditText
android:id="@+id/entry"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text=""
/>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Button
android:id="@+id/btnFunctions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Functions"
/>
<Button
android:id="@+id/btnConversions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Conversions"
/>
<Button
android:id="@+id/btnConstants"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Constants"
/>
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Button
android:id="@+id/btnGraphs"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Graphs"
/>
<Button
android:id="@+id/btnStats"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Stats"
/>
</LinearLayout>
</LinearLayout>
However, when I run ant install
and try out the app on the emulator, the last two buttons in the last (nested) LinearLayout, btnGraphs and btnStats, do not show up at all (the rest is fine).
What am I doing wrong?