Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If the background you are using is just a simple rectangle, you can create that background image from xml and set it as your <code>TextView</code>'s background.</p> <p>Create a folder called <code>drawable</code> in <code>res</code> folder. And inside that <code>drawable</code> folder create an xml file (shape) (lets call it <code>text_background.xml</code>)</p> <p>text_background.xml :</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" &gt; &lt;!-- Rounded Corner Settings --&gt; &lt;corners android:bottomLeftRadius="8dp" android:bottomRightRadius="8dp" android:topLeftRadius="0dp" android:topRightRadius="0dp" /&gt; &lt;!-- Rectangle Solid Color Settings --&gt; &lt;solid android:color="#ffffff" /&gt; &lt;!-- Rectangle Stroke Settings --&gt; &lt;stroke android:width="1dp" android:color="#000000" /&gt; &lt;/shape&gt; </code></pre> <p>And then in your <code>layout</code> xml add this shape to your <code>TextView</code> as <code>background</code></p> <pre><code>&lt;TextView android:id="@+id/numberId" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/numberId" android:textSize="22sp" android:textColor="#fff" android:textStyle="bold" android:layout_marginTop="3dp" android:layout_marginRight="5dp" android:layout_alignParentRight="true" android:background="@drawable/text_background" /&gt; </code></pre> <p>And remove the <code>ImageView</code> from the layout as you don't need it anymore. Hope this helps</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.
    1. 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