Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid ActionBar has border when using Nine-Patch background
    primarykey
    data
    text
    <p>I'm using a nine-patch png as the windowBackground for an Android app. However, I get a 1px border around the ActionBar. This doesn't happen when I use a simple png.</p> <p>To test this, I've created a basic app using the wizard:</p> <ul> <li>android:minSdkVersion="10"</li> <li>android:targetSdkVersion="17"</li> <li>Tested on Galaxy Nexus v.4.2.2</li> </ul> <p>Interestingly enough, the XML Layout preview in Eclipse is showing the same border.</p> <p>/res/values/styles.xml</p> <pre><code>&lt;resources&gt; &lt;!-- Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res/values-vXX/styles.xml on newer devices. --&gt; &lt;style name="AppBaseTheme" parent="android:Theme.Light"&gt; &lt;!-- Theme customizations available in newer API levels can go in res/values-vXX/styles.xml, while customizations related to backward-compatibility can go here. --&gt; &lt;/style&gt; &lt;!-- Application theme. --&gt; &lt;style name="AppTheme" parent="AppBaseTheme"&gt; &lt;!-- All customizations that are NOT specific to a particular API-level can go here. --&gt; &lt;item name="android:windowBackground"&gt;@drawable/test4&lt;/item&gt; &lt;/style&gt; &lt;/resources&gt; </code></pre> <p>Two screenshots comparing the affect (no, this isn't a real background, just one for testing :-) As you can see, the ActionBar is inset by 1px all the way around.</p> <p>Added - I've tried a manually created 9patch and one using Google's draw9patch tool.</p> <p><img src="https://i.stack.imgur.com/6O3rh.png" alt="Using the 9-patch background"> <img src="https://i.stack.imgur.com/lkUCE.png" alt="Using simple png as background"> <img src="https://i.stack.imgur.com/GdKA1.png" alt="The 9-patch png"></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. 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