Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You could also try a simplified layout, like:</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/itemRoot" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingBottom="4sp"&gt; &lt;LinearLayout android:paddingLeft="45dip" android:background="#caced4" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" android:layout_marginTop="10dp" android:clipChildren="false" android:onClick="itemClicked"&gt; &lt;TextView android:id="@+id/itemTitle" android:text="Arrêtez moi ces répondeurs d'email" android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="2" android:textColor="#424e5f" android:textSize="13sp" android:textStyle="bold" /&gt; &lt;TextView android:id="@+id/itemDescription" android:text="Qui, suite à l'envoi d'un email, n'a pas reçu etc." android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#000000" android:maxLines="3" android:textSize="11sp" /&gt; &lt;/LinearLayout&gt; &lt;TableLayout android:id="@+id/TableLayout01" android:background="@drawable/corner" android:layout_width="40dip" android:layout_height="40dip"&gt; &lt;TextView android:id="@+id/itemPubdate" android:text="03 sept." android:background="#424e5f" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="3px" android:layout_marginBottom="3px" android:layout_marginRight="3px" android:layout_marginTop="3px" android:gravity="center" android:textStyle="bold" /&gt; &lt;/TableLayout&gt; &lt;/RelativeLayout&gt; </code></pre> <p>or thinking a bit more about it, take the full advantage of the <code>RelativeLayout</code>. <br /> That would contain only your calendar-item (<code>TableLayout</code>), and the two <code>TextViews</code>, but for this you'd probably need a custom drawable (a simple solid-colored one with an <code>android:top="10dp"</code> set.</p> <p><strong>Update</strong>:<br /> With <code>RelativeLayout</code> and two custom drawables (from which one you already partially have: <code>corner</code>), you can achieve this layout: </p> <p><img src="https://i.stack.imgur.com/5g7rX.jpg" alt="overlapping layout sample"></p> <p>For such a result you need the <br /> <strong>row_layout.xml</strong>:</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/itemRoot" android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="4sp" android:background="@drawable/overlap" android:onClick="itemClicked"&gt; &lt;TextView android:id="@+id/itemPubdate" android:text="03 sept." android:background="@drawable/overlap_calendar" android:layout_width="40dip" android:layout_height="40dip" android:gravity="center" android:textStyle="bold" /&gt; &lt;TextView android:id="@+id/itemTitle" android:paddingLeft="5sp" android:text="Arrêtez moi ces répondeurs d'email" android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="2" android:textColor="#424e5f" android:textSize="13sp" android:textStyle="bold" android:ellipsize="end" android:layout_toRightOf="@id/itemPubdate" android:paddingTop="10dp"/&gt; &lt;TextView android:id="@+id/itemDescription" android:paddingLeft="5sp" android:text="Qui, suite à l'envoi d'un email, n'a pas reçu etc." android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#000000" android:maxLines="3" android:textSize="11sp" android:layout_toRightOf="@id/itemPubdate" android:layout_below="@id/itemTitle" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>and the two referenced drawables<br /> <strong>res/drawable/overlap.xml</strong>:</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;item android:top="10dp" android:bottom="2dp" android:left="2dp" android:right="2dp"&gt; &lt;shape&gt; &lt;solid android:color="#caced4" /&gt; &lt;stroke android:width="3dp" color="#caced4" /&gt; &lt;padding android:left="2dp" android:top="2dp" android:right="2dp" android:bottom="2dp" /&gt; &lt;/shape&gt; &lt;/item&gt; &lt;/layer-list&gt; </code></pre> <p>and <strong>res/drawable/overlap_calendar.xml</strong>:</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;item&gt; &lt;shape android:shape="rectangle"&gt; &lt;solid android:color="#f0f0f0" /&gt; &lt;corners android:bottomRightRadius="3dp" android:bottomLeftRadius="3dp" android:topLeftRadius="3dp" android:topRightRadius="3dp" /&gt; &lt;/shape&gt; &lt;/item&gt; &lt;item android:top="2dp" android:left="2dp" android:right="2dp" android:bottom="2dp"&gt; &lt;shape android:shape="rectangle"&gt; &lt;solid android:color="#424e5f" /&gt; &lt;corners android:bottomRightRadius="3dp" android:bottomLeftRadius="3dp" android:topLeftRadius="3dp" android:topRightRadius="3dp" /&gt; &lt;/shape&gt; &lt;/item&gt; &lt;/layer-list&gt; </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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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