編程設置窗口標題欄圖標導致每個列表視圖項目都具有平鋪欄圖標作爲背景。Android窗口標題欄圖標導致列表視圖項目的背景
setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, R.drawable.ball);
如何刪除ListView的背景圖像或設置窗口的標題欄圖標不是方案的其他方式?
隨着窗口標題圖標設置
用了窗口標題圖標
--update
<?xml version="1.0" encoding="utf-8"?>
<!-- Sets the text styles -->
<resources>
<style name="CustomWindowTitleText" parent="android:TextAppearance.WindowTitle">
<item name="android:textSize">24dip</item>
<item name="android:textColor">#ffffff</item>
<item name="android:textStyle">bold</item>
<item name="android:typeface">normal</item>
</style>
<!-- Changes the background color of the title bar -->
<style name="CustomWindowTitleBackground">
<item name="android:background">@drawable/bg_gradient_05</item>
<item name="android:paddingLeft">10dp</item>
</style>
<!-- Set the theme for the window title -->
<!-- NOTE: setting android:textAppearence to style defined above -->
<style name="CustomWindowTitle" parent="android:WindowTitle">
<item name="android:textAppearance">@style/CustomWindowTitleText</item>
<item name="android:shadowDx">0</item>
<item name="android:shadowDy">0</item>
<item name="android:shadowRadius">0</item>
<item name="android:shadowColor">#a0a0a0</item>
</style>
<!-- Override properties in the default theme -->
<!-- NOTE: you must explicitly the windowTitleSize property, the title bar will not re-size automatically, text will be clipped -->
<style name="CustomTheme" parent="android:Theme">
<item name="android:windowTitleSize">50dip</item>
<item name="android:windowTitleStyle">@style/CustomWindowTitle</item>
<item name="android:windowTitleBackgroundStyle">@style/CustomWindowTitleBackground</item>
</style>
</resources>
爲什麼不使用自定義標題欄? – 2011-04-12 05:49:46
@Tanmay Mandal已經在使用自定義標題欄 – 2011-04-12 07:06:02
woww ..... Sweepshots luk hav改變了..... !!! – 2011-04-16 06:43:53