Note that there are some explanatory texts on larger screens.

plurals
  1. POHave bottom border for TableLayout which is used as row in ListView
    primarykey
    data
    text
    <p>According to <a href="https://stackoverflow.com/questions/2422120/open-sided-android-stroke">Open-sided Android stroke?</a>, there are basically 2 ways to implement borders for TableLayout.</p> <p><strong>Use Stroke</strong></p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;shape xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;solid android:color="#00ffffff"/&gt; &lt;stroke android:width="1dp" android:color="#ffffff"/&gt; &lt;/shape&gt; </code></pre> <p><img src="https://i.stack.imgur.com/EPyq2.png" alt="enter image description here"></p> <p>However, this is not something which I want, as I only want bottom border. Hence, I try another alternative.</p> <p><strong>Use 2 layers</strong></p> <pre><code>&lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;!-- This is the line --&gt; &lt;item&gt; &lt;shape&gt; &lt;solid android:color="#ffffff" /&gt; &lt;/shape&gt; &lt;/item&gt; &lt;!-- This is the main color --&gt; &lt;item android:bottom="1dp"&gt; &lt;shape&gt; &lt;solid android:color="#000000" /&gt; &lt;/shape&gt; &lt;/item&gt; &lt;/layer-list&gt; </code></pre> <p><img src="https://i.stack.imgur.com/qNYOw.png" alt="enter image description here"></p> <p>However, during list view selection, the <code>TableRow</code> will not be highlighted with <code>ListView</code> selection color, as its background already take over by <strong>"#000000"</strong> layer.</p> <p>Is there any better way I can have bottom border only, yet it will obey <code>ListView</code> selection highlight color?</p>
    singulars
    1. This table or related slice is empty.
    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