0

I finally understood what themes are and how to apply them to a dialog. I would like to create a theme and I need help from you to achieve what I want. I basically want to create a theme to apply to alert dialogs and to dialogs throughout my application.

In my theme, I need to define the title background color, title text size, main body background color and main body text size. What items should I use?

Here is the starting code to prove that I put some work into it :)

<?xml version="1.0" encoding="utf-8"?> 
<resources>     
<style name="myGeneralDialogStyle" parent="@android:style/Theme.Dialog">    
     <item name="?"></item>     
</style> 
</resources> 
Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
Snake
  • 14,228
  • 27
  • 117
  • 250

1 Answers1

0

IF all you got is the XML you shown above, then if your questions is about this "?" sign in name="?" part, then only thing you can use here are defined attributes. In your case you can i.e. use android:* ones. If you need to define own attributes then see here: Declaring a custom android UI element using XML

Community
  • 1
  • 1
Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141
  • Thank you, but where is the link? Exactly, I need to know what attributes corresponds to what. I mean I know about android:background, so does that refer to main body background or the title background? How can I distinguish – Snake Oct 10 '12 at 16:13
  • @Snake you need to find declaration of this attribute. It would most likely be `` – Marcin Orlowski Oct 10 '12 at 16:55