Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can customize the way the default EditText is drawn by creating an XML file in the 'Drawable' folder and mentioning in code how you want it to look. Sample given below:</p> <pre><code>&lt;selector&gt;&lt;item android:state_pressed="true"&gt; &lt;shape android:shape="rectangle"&gt; &lt;gradient android:startColor="#40FFE600" android:centerColor="#60FFE600" android:endColor="#90FFE600" android:angle="270" android:centerX="0.5" android:centerY="0.5" /&gt; &lt;stroke android:width="5dp" android:color="#50FF00DE" /&gt; &lt;corners android:radius="7dp" /&gt; &lt;padding android:left="10dp" android:top="6dp" android:right="10dp" android:bottom="6dp" /&gt; &lt;/shape&gt; &lt;/item&gt; &lt;item android:state_focused="true"&gt; &lt;shape&gt; &lt;gradient android:startColor="#40CB1759" android:centerColor="#60CB1759" android:endColor="#90CB1759" android:angle="270" android:centerX="0.5" android:centerY="0.5" /&gt; &lt;stroke android:width="5dp" android:color="#50ff0000" /&gt; &lt;corners android:radius="7dp" /&gt; &lt;padding android:left="10dp" android:top="6dp" android:right="10dp" android:bottom="6dp" /&gt; &lt;/shape&gt; &lt;/item&gt; &lt;item&gt; &lt;shape&gt; &lt;gradient android:startColor="#402168D2" android:centerColor="#602168D2" android:endColor="#902168D2" android:angle="270" android:centerX="0.5" android:centerY="0.5" /&gt; &lt;stroke android:width="5dp" android:color="#50ff0000" /&gt; &lt;corners android:radius="7dp" /&gt; &lt;padding android:left="10dp" android:top="6dp" android:right="10dp" android:bottom="6dp" /&gt; &lt;/shape&gt; &lt;/item&gt;&lt;/selector&gt; </code></pre>
 

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