Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid: Rounded Corners TextView XML Layout with custom Header
    primarykey
    data
    text
    <p>I would like to create a custom XML layout for my TextView, using rounded corners and a custom header, such as this example.</p> <p><img src="https://i.stack.imgur.com/iM3eo.jpg" alt="enter image description here"></p> <p>I found this very <a href="http://www.donnfelker.com/android-rounded-corners-with-a-beveldrop-shadow/" rel="nofollow noreferrer">useful link</a> that creates the following quite similar result.</p> <p><img src="https://i.stack.imgur.com/EuVPC.png" alt="enter image description here"></p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;!-- Bottom 2dp Shadow --&gt; &lt;item&gt; &lt;shape android:shape="rectangle"&gt; &lt;solid android:color="#d8d8d8" /&gt; &lt;corners android:radius="7dp" /&gt; &lt;/shape&gt; &lt;/item&gt; &lt;!-- White Top color --&gt; &lt;item android:bottom="3px"&gt; &lt;shape android:shape="rectangle"&gt; &lt;solid android:color="#FFFFFF" /&gt; &lt;corners android:radius="7dp" /&gt; &lt;/shape&gt; &lt;/item&gt; &lt;/layer-list&gt; </code></pre> <p>I wonder if it possibile to modify the XML layout above to get the header "ADD FRIEND" style, that is the darker gray background and the divider between the header textview ("ADD FRIEND") and the textview below (the one containing the "Nickname or email" and the "search" button).</p> <p>I am thinking it is probably easier to do it with an image/drawable background, but getting it done in XML would be awesome (in terms of reusability for example).</p> <p>Any help or suggestion on how to proceed is very welcome!</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.
    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