Android - themes

0

W SDK res/values/styles.xml mamy np:

<style name="Theme.NoTitleBar"> <item name="windowNoTitle">true</item> </style>

Dlaczego nie oznaczono tutaj parent="Theme" ?
Po czym on sobie sprawdza, co jest parentem?
Przeciez nie po nazwie :-\

0

Odpowiedz w dokumentacji: http://developer.android.com/guide/topics/ui/themes.html#Inheritance

Jesli style definiowane sa w tym samym 'module', to wszystko przed ostatnia kropka wskazuje na parenta. I tak, parentem dla Theme.Material jest Theme.
Jesli ty definiujesz style i chcesz zeby parentem byl jakis styl z sdk, to musisz uzyc parent bo to inny 'modul'.

0
the real mućka napisał(a):

Odpowiedz w dokumentacji: http://developer.android.com/guide/topics/ui/themes.html#Inheritance

Jesli style definiowane sa w tym samym 'module', to wszystko przed ostatnia kropka wskazuje na parenta. I tak, parentem dla Theme.Material jest Theme.
Jesli ty definiujesz style i chcesz zeby parentem byl jakis styl z sdk, to musisz uzyc parent bo to inny 'modul'.

Dzięki.
Lama ze mnie. Nie doczytałem :(
If you want to inherit from styles that you've defined yourself, you do not have to use the parent attribute. Instead, just prefix the name of the style you want to inherit to the name of your new style, separated by a period. For example, to create a new style that inherits the CodeFont style defined above, but make the color red, you can author the new style like this:

0

Chociaz szukalem w innym topicu app res -> other http://developer.android.com/guide/topics/resources/style-resource.html

1 użytkowników online, w tym zalogowanych: 0, gości: 1