Android window title bar icon is causing background for list view items -


programmatic setting window title bar icon causing every list view item has tile bar icon background.

setfeaturedrawableresource(window.feature_left_icon, r.drawable.ball);

how can remove listview background image or set window title bar icon other way programmatic?

with window title icon set

enter image description here

with out window title icon

enter image description here

--update

<?xml version="1.0" encoding="utf-8"?> <!-- sets 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 background color of title bar -->      <style name="customwindowtitlebackground">            <item name="android:background">@drawable/bg_gradient_05</item>            <item name="android:paddingleft">10dp</item>      </style>      <!-- set theme window title -->      <!-- note: setting android:textappearence 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 default theme -->       <!-- note: must explicitly windowtitlesize property, title bar not re-size automatically, text 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> 

use following code

requestwindowfeature(window.feature_custom_title); setcontentview(r.layout.my_layout); getwindow().setfeatureint(window.feature_custom_title, r.layout.custom_title); 

please sure using requestwindowfeature before setcontentview.here in r.layout.custom_title use custom title xml.

i think you.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -