making own theme

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

making own theme

Postby pskink » Thu Dec 18, 2008 2:40 pm

hi,

i'm making my own theme however it's not easy task. are there any resources on how create decent theme? attached images show what i've managed so far, not much to be honest, but i'm happy everything is done by one change in manifest.xml: android:theme="@style/MyTheme"
Attachments
listPressed.png
listPressed.png (16.99 KiB) Viewed 9339 times
buttonSelected.png
buttonSelected.png (16.62 KiB) Viewed 9339 times
buttonPressed.png
buttonPressed.png (16.46 KiB) Viewed 9339 times
editSelected.png
editSelected.png (16.72 KiB) Viewed 9339 times
editPressed.png
editPressed.png (16.43 KiB) Viewed 9339 times
Last edited by pskink on Fri Dec 19, 2008 12:59 pm, edited 1 time in total.
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Top

Postby haden » Thu Dec 18, 2008 3:29 pm

Looks pretty cool. It would be great if you posted a tutorial on how you did that. There are many of us out here interested in creating our own themes..
haden
Experienced Developer
Experienced Developer
 
Posts: 74
Joined: Thu Sep 11, 2008 11:51 am

Postby pskink » Thu Dec 18, 2008 3:53 pm

haden wrote:Looks pretty cool. It would be great if you posted a tutorial on how you did that. There are many of us out here interested in creating our own themes..


tutorial? well, in order to post tutorial i'd need to know pretty sure how to make decent theme. right now i do it as a blind man... but when i get to know more... why not? i can send sources anyway. what do you guys think? do you want to contribute?
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby haden » Thu Dec 18, 2008 3:55 pm

but i surely would like to know how you did that.
haden
Experienced Developer
Experienced Developer
 
Posts: 74
Joined: Thu Sep 11, 2008 11:51 am

Postby pskink » Thu Dec 18, 2008 4:50 pm

haden wrote:but i surely would like to know how you did that.


ok, i'll send sources 2nite
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby pskink » Thu Dec 18, 2008 9:07 pm

haden wrote:but i surely would like to know how you did that.


then look at the attached file
Attachments
Theme.tar.gz
starting point of green theme
(43 KiB) Downloaded 1162 times
Last edited by pskink on Sat Dec 20, 2008 11:36 am, edited 2 times in total.
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Top

Postby pskink » Fri Dec 19, 2008 1:10 pm

fyi: added EditTexts
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby pskink » Sat Dec 20, 2008 5:12 pm

fyi: added Spinners
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby darolla » Sun Jan 11, 2009 6:28 pm

hi,

as I can see u use the <selector> to overwrite view, buttons, ...

but why do u (does android) have these helplines next to their buttons?

I'll attach your btn_default_normal.9.png for easier reading this post.

greetings,
DaRolla
Attachments
btn_default_normal.9.png
btn_default_normal.9.png (766 Bytes) Viewed 9243 times
User avatar
darolla
Master Developer
Master Developer
 
Posts: 273
Joined: Thu Sep 25, 2008 5:16 pm
Location: Dortmund, Germany

Postby darolla » Sun Jan 11, 2009 6:30 pm

User avatar
darolla
Master Developer
Master Developer
 
Posts: 273
Joined: Thu Sep 25, 2008 5:16 pm
Location: Dortmund, Germany

Postby darolla » Sun Jan 11, 2009 7:28 pm

without the ressrc folder its working, too.

why do u use this?

do u know how to change the check boxes?

greetings,
darolla

ps: I packed all original checkboxes for u...
Attachments
CheckBox.zip
(23.56 KiB) Downloaded 469 times
User avatar
darolla
Master Developer
Master Developer
 
Posts: 273
Joined: Thu Sep 25, 2008 5:16 pm
Location: Dortmund, Germany

Postby Emmanuel7 » Mon Jan 12, 2009 1:48 am

Something that could help understanding themes is to have a look at Android's default themes :
They are located in your Android SDK directories :

In particular, these files are interesting :
<AndroidSDK>\tools\lib\res\default\values\themes.xml
<AndroidSDK>\tools\lib\res\default\values\styles.xml

The default drawable selector for buttons :
<AndroidSDK>\tools\lib\res\default\drawable\btn_default.xml


Note : searching in this directories, one can also found the included anims, or the default list items provided by android, that can also be of great interest to learn more about the Android UI :
<AndroidSDK>\tools\lib\res\default\anim\
<AndroidSDK>\tools\lib\res\default\layout\simple_list_item_1.xml
Emmanuel7
Senior Developer
Senior Developer
 
Posts: 164
Joined: Fri Dec 12, 2008 2:17 am
Location: Paris

Postby pskink » Mon Jan 12, 2009 10:14 am

darolla wrote:but why do u (does android) have these helplines next to their buttons?

I'll attach your btn_default_normal.9.png for easier reading this post.

greetings,
DaRolla


you mean black, one pixel wide vertical and horizontal lines? these are strechable portion of 9 patch drawables
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby pskink » Mon Jan 12, 2009 10:21 am

darolla wrote:without the ressrc folder its working, too.

why do u use this?

do u know how to change the check boxes?

greetings,
darolla

ps: I packed all original checkboxes for u...


ressrc contains some resources used to generate final bitmaps.

checkboxes should be easy to implement, but i have no idea how to change tabhosts/tabwidgets...
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby darolla » Mon Jan 12, 2009 10:40 am

about checkboxes: I think we need a <selector> with <item>. but what are the xml attributes for checked and unchecked and focused and disabled and ... ? is there an android.dtd oder android xsd? or how do you get the names of the attributes?

about tabhost: I pack all graphics I've found inside the SDK. maybe you can use them or search inside the sources?

greetings,
marco
Attachments
tab.zip
(38.83 KiB) Downloaded 525 times
User avatar
darolla
Master Developer
Master Developer
 
Posts: 273
Joined: Thu Sep 25, 2008 5:16 pm
Location: Dortmund, Germany

Top
Next

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Google [Bot] and 7 guests