Extending android:WindowTitle

折月煮酒 提交于 2019-12-19 07:39:04

问题


I wish to extend android:WindowTitle

But parent="android:WindowTitle" no longer works in newer SDKs. It's a private style

What is a good public replacement for parent="android:WindowTitle"?

I am getting lost reading this thread.

Any alernative way for using <style name="CustomWindowTitle" parent="android:WindowTitle"> with out machine dependent hot fixes so that my code compiles for rest of the team?


回答1:


You can open android-sdk-windows\platforms\android-6\data\res\values\styles.xml and copypaste your style from there.

I can see in there something like

<style name="WindowTitle">
        <item name="android:singleLine">true</item>
        <item name="android:textAppearance">@style/TextAppearance.WindowTitle</item>
        <item name="android:shadowColor">#BB000000</item>
        <item name="android:shadowRadius">2.75</item>
</style>

So you can define the same or similar style in your code. Generally, data/res directory in android SDK contains many interesting resources.



来源:https://stackoverflow.com/questions/8253057/extending-androidwindowtitle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!