Android アプリの windowBackground として 9 パッチの png を使用しています。ただし、ActionBar の周囲に 1px の境界線が表示されます。これは、単純な png を使用する場合には発生しません。
これをテストするために、ウィザードを使用して基本的なアプリを作成しました。
- アンドロイド:minSdkVersion="10"
- アンドロイド:targetSdkVersion="17"
- Galaxy Nexus v.4.2.2でテスト済み
興味深いことに、Eclipse の XML レイアウト プレビューには同じ境界線が表示されています。
/res/values/styles.xml
<resources>
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
<item name="android:windowBackground">@drawable/test4</item>
</style>
</resources>
影響を比較する 2 つのスクリーンショット (いいえ、これは実際の背景ではなく、テスト用の 1 つです :-)
追加 - 手動で作成した 9patch と、Google の draw9patch ツールを使用したものを試しました。