Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to add border around TableLayout?
    primarykey
    data
    text
    <p>Below is my table code. My screen looks like this <a href="http://imgur.com/dFP298o" rel="noreferrer">http://imgur.com/dFP298o</a> but I wanna make it looks like this <a href="http://imgur.com/YuYJiJx" rel="noreferrer">http://imgur.com/YuYJiJx</a>. How can I add borders around each row and around table layout?</p> <pre><code>&lt;TableLayout android:id="@+id/table2" android:layout_width="fill_parent" android:layout_below="@+id/test_button_text23" android:layout_marginLeft="45dp" android:layout_marginBottom="25dp" android:layout_marginRight="45dp" android:layout_height="fill_parent" android:stretchColumns="*" &gt; &lt;TableRow android:layout_width="match_parent" android:layout_height="match_parent" &gt; &lt;TextView android:gravity="left" android:text="Quantity" android:textStyle="bold" /&gt; &lt;TextView android:gravity="center" android:textStyle="bold" android:text="Item" /&gt; &lt;/TableRow&gt; &lt;/TableLayout&gt; </code></pre> <p>&nbsp;</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;TableRow xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" &gt; &lt;TextView android:id="@+id/localTime" android:textColor="#000000" android:gravity="left" /&gt; &lt;TextView android:id="@+id/apprentTemp" android:textColor="#000000" android:gravity="center" /&gt; &lt;/TableRow&gt; </code></pre> <p>&nbsp;</p> <pre><code>View row = getLayoutInflater().inflate(R.layout.rows, null); ((TextView) row.findViewById(R.id.localTime)).setText(item.getString("Item")); ((TextView) row.findViewById(R.id.apprentTemp)).setText(item.getString("Quantity")); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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