2011-04-22 24 views
11

Uygulamam için özel bir başlık çubuğu oluşturdum ancak uygulamayı uygularken bazı sorunlar yaşıyorum. Ben aşağıdaki gibidir renk ve metin ve başlık çubuğundaAndroid'de özel başlık çubuğu oluştur

styles.xml düzeni için görünümünü değiştirmek istiyorum:

<?xml version="1.0" encoding="utf-8"?> 
<resources> 

<style name="MyTheme"> 
    <item name="android:tabWidgetStyle">@style/LightTabWidget</item> 


</style> 
<style name="MyWindowTitleBackground" parent="@android:style/WindowTitleBackground"> 
    <item name="android:background">@android:drawable/title_bar</item> 

</style> 

<style name="MyWindowTitle" parent="@android:style/WindowTitle"> 
    <item name="android:singleLine">true</item> 
    <item name="android:windowTitleSize">40dip</item> 
    <item name="android:textAppearance">@style/MyTextAppearance</item> 
    <item name="android:shadowColor">#BB000000</item> 
    <item name="android:shadowRadius">2.75</item> 
</style> 
<style name="MyTextAppearance" parent="@android:style/TextAppearance.WindowTitle"> 
    <item name="android:textColor">#3A6629</item> 
    <item name="android:textSize">14sp</item> 
    <item name="android:textStyle">bold</item> 
</style> 

<style name="LightTabWidget" parent="@android:style/Widget.TabWidget"> 

    <item name="android:textSize">20px</item> 
    <item name="android:textStyle">bold</item> 

    <item name="android:textColor">#FF5721</item> 
</style> 
</resources> 

Ve şöyle ben manifest dosyasında bu tema ekledik:

<application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@android:style/Theme.Light"> 
    <activity android:name="LAFoodBankAboutUs" android:label="@string/app_name" android:theme="@style/MyTheme"> 

Özel başlık çubuğunu göstermek için ne yapmam gerekir?

+0

(http://www.londatiga.net/it/how-to-create-custom-window-title-in- de yeralmaktadır android /) ve [here] (http://www.helloandroid.com/tutorials/how-create-custom-titlebar) özel bir pencere başlık çubuğu nasıl oluşturulur. – Pasha

cevap

İlgili konular