Note that there are some explanatory texts on larger screens.

plurals
  1. POStyled EditText inside a compound view doesn't gain focus
    text
    copied!<p>I have made a very simple compound view: </p> <pre><code>&lt;LinearLayout&gt; &lt;ImageView /&gt; &lt;EditText /&gt; &lt;/LinearLayout&gt; </code></pre> <p>Everything worked fine until I have decided to style the Edit text throught my project:theme:</p> <pre><code> &lt;style name="Theme.MyProject" parent="Theme.Sherlock.Light.DarkActionBar"&gt; &lt;item name="actionBarStyle"&gt;@style/Widget.Theme.MyProject.ActionBar&lt;/item&gt; &lt;item name="android:actionBarStyle" tools:ignore="NewApi"&gt;@style/Widget.Playout.ActionBar&lt;/item&gt; &lt;item name="android:buttonStyle"&gt;@style/Theme.Theme.MyProject.Button&lt;/item&gt; &lt;item name="android:editTextStyle"&gt;@style/Theme.Theme.MyProject.EditText&lt;/item&gt; &lt;/style&gt; </code></pre> <p>and</p> <pre><code>&lt;style name="Theme.Playout.EditText"&gt; &lt;item name="android:textSize"&gt;15sp&lt;/item&gt; &lt;item name="android:textColor"&gt;@color/field_text&lt;/item&gt; &lt;item name="android:background"&gt;@color/field&lt;/item&gt; &lt;item name="android:minHeight"&gt;50dp&lt;/item&gt; &lt;item name="android:padding"&gt;5dp&lt;/item&gt; &lt;item name="android:gravity"&gt;center&lt;/item&gt; &lt;item name="android:fontFamily"&gt;sans-serif-light&lt;/item&gt; &lt;/style&gt; </code></pre> <p>Now my EditText is beautiful but is not gaining focus so text cannot being entered (so useful). It works fine adding values directly to the Compound view from layout but I whould like to do it from a confortable theme. </p> <p>Thanks in advance!</p>
 

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