Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Question: Working With TableView/Text Under Icon
    text
    copied!<p>I'm looking to make a basic launcher for an application (basically a home screen that launches other activities). Using an absolute layout, I was able to come up with a rough idea of what I'm looking for. All of the "TextView" fields would be replaced with the name of the activity to be launched.</p> <p>But I don't want to use an absolute layout, to avoid the obvious problems. I read on the forums that I could use a TableView, and each TableRow would add a row, and each ButtonImage would essentially add a column. The problem with that is I cannot seem to figure out how to get a TextView to appear underneath each image button, since that essentially inserts a new column into the table (so the image and text appear side-by-side instead of text under image).</p> <p>Attached is my current XML for the example layout in absolute form. Any help would be IMMENSELY appreciated. :)</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;AbsoluteLayout android:id="@+id/widget39" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" &gt; &lt;ImageButton android:id="@+id/news" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/news" android:layout_x="87px" android:layout_y="100px" &gt; &lt;/ImageButton&gt; &lt;ImageButton android:id="@+id/phone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/phonebook" android:layout_x="145px" android:layout_y="100px" &gt; &lt;/ImageButton&gt; &lt;ImageButton android:id="@+id/message" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/message" android:layout_x="203px" android:layout_y="100px" &gt; &lt;/ImageButton&gt; &lt;ImageButton android:id="@+id/calendar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/planner" android:layout_x="86px" android:layout_y="179px" &gt; &lt;/ImageButton&gt; &lt;ImageButton android:id="@+id/help" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/panic" android:layout_x="145px" android:layout_y="180px" &gt; &lt;/ImageButton&gt; &lt;ImageButton android:id="@+id/exit" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/exit" android:layout_x="205px" android:layout_y="180px" &gt; &lt;/ImageButton&gt; &lt;TextView android:id="@+id/widget47" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" android:layout_x="80px" android:layout_y="146px" &gt; &lt;/TextView&gt; &lt;TextView android:id="@+id/widget48" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" android:layout_x="142px" android:layout_y="147px" &gt; &lt;/TextView&gt; &lt;TextView android:id="@+id/widget49" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" android:layout_x="201px" android:layout_y="147px" &gt; &lt;/TextView&gt; &lt;TextView android:id="@+id/widget50" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" android:layout_x="79px" android:layout_y="227px" &gt; &lt;/TextView&gt; &lt;TextView android:id="@+id/widget51" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" android:layout_x="141px" android:layout_y="228px" &gt; &lt;/TextView&gt; &lt;TextView android:id="@+id/widget52" android:layout_width="wrap_content" android:layout_height="20px" android:text="TextView" android:layout_x="203px" android:layout_y="228px" &gt; &lt;/TextView&gt; &lt;/AbsoluteLayout&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload