my own titlebar (backbutton like on the iphone)

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

Postby darolla » Thu Jan 29, 2009 6:18 pm

and the nice jetpack / pressed jetpack ist done like this:

jetpack.xml
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <?xml version="1.0" encoding="utf-8"?>
  3.  
  4. <selector xmlns:android="http://schemas.android.com/apk/res/android">
  5.  
  6.  
  7.  
  8.     <item android:state_pressed="false"
  9.  
  10.        android:drawable="@drawable/jetpack_normal" />
  11.  
  12.        
  13.  
  14.     <item android:state_pressed="true"
  15.  
  16.        android:drawable="@drawable/jetpack_pressed" />
  17.  
  18.        
  19.  
  20. </selector>
  21.  
  22.  
Parsed in 0.001 seconds, using GeSHi 1.0.8.4


Greetings,
DaRolla :D
Attachments
jetpack_pressed.png
jetpack_pressed.png (9 KiB) Viewed 3702 times
jetpack_normal.png
jetpack_normal.png (7.05 KiB) Viewed 3702 times
Last edited by darolla on Tue Feb 17, 2009 11:57 am, edited 2 times in total.
User avatar
darolla
Master Developer
Master Developer
 
Posts: 273
Joined: Thu Sep 25, 2008 5:16 pm
Location: Dortmund, Germany

Top

Postby darolla » Thu Jan 29, 2009 6:27 pm

the get rid of the shadow beneath the new title you have to add to themes.xml

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2.     <item name="android:windowContentOverlay">@android:color/transparent</item>
  3.  
  4.  
Parsed in 0.000 seconds, using GeSHi 1.0.8.4


in the defaul themes.xml is references title_bar_shadow.

I'll attach it.

But it like the shadow as it is ;)

Greetings,
DaRolla
Attachments
title_bar_shadow.png
title_bar_shadow.png (2.78 KiB) Viewed 3700 times
User avatar
darolla
Master Developer
Master Developer
 
Posts: 273
Joined: Thu Sep 25, 2008 5:16 pm
Location: Dortmund, Germany

Postby darolla » Thu Jan 29, 2009 6:44 pm

just another thing :)

drawable/gradient.xml
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <?xml version="1.0" encoding="utf-8"?>
  3.  
  4. <shape xmlns:android="http://schemas.android.com/apk/res/android">
  5.  
  6.         <gradient android:angle="90" android:startColor="#FFdaf3fc"
  7.  
  8.                 android:endColor="#FFd4e9a9" />
  9.  
  10. </shape>
  11.  
  12.  
Parsed in 0.001 seconds, using GeSHi 1.0.8.4


in my.xml in the linearlayout:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2.                 <View android:background="@drawable/gradient"
  3.  
  4.                         android:layout_width="fill_parent" android:layout_height="25px" />
  5.  
  6.  
Parsed in 0.001 seconds, using GeSHi 1.0.8.4


now we have a smooth color gradient between the green from the title and the blue from the content.

greetings,
darolla
Attachments
Title3.zip
(30.41 KiB) Downloaded 136 times
Title3.png
Title3.png (12.79 KiB) Viewed 3699 times
User avatar
darolla
Master Developer
Master Developer
 
Posts: 273
Joined: Thu Sep 25, 2008 5:16 pm
Location: Dortmund, Germany

Postby pskink » Thu Jan 29, 2009 7:01 pm

darolla wrote:I did it :)

thanks go to... well, please look at the screenshot :)

greetings
darolla


great! i'll add custom header to my repo...

do you have iphone's backbutton? but without any background (just button with transparency)?
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby darolla » Thu Jan 29, 2009 7:08 pm

you mean that we need a graphic? lets google ;)
User avatar
darolla
Master Developer
Master Developer
 
Posts: 273
Joined: Thu Sep 25, 2008 5:16 pm
Location: Dortmund, Germany

Postby darolla » Thu Jan 29, 2009 7:16 pm

using photoshop's gradient feature I made my own title_bar_shadow2.png

Greetings,
DaRolla
Attachments
Title4.zip
(34.76 KiB) Downloaded 139 times
Title4.png
Title4.png (13.81 KiB) Viewed 3693 times
User avatar
darolla
Master Developer
Master Developer
 
Posts: 273
Joined: Thu Sep 25, 2008 5:16 pm
Location: Dortmund, Germany

Top

Postby darolla » Thu Jan 29, 2009 7:20 pm

pskink wrote:great! i'll add custom header to my repo...
do you have iphone's backbutton? but without any background (just button with transparency)?


looks like this I guess...
Attachments
iphone_back[1].jpg
iphone_back[1].jpg (37.15 KiB) Viewed 3691 times
User avatar
darolla
Master Developer
Master Developer
 
Posts: 273
Joined: Thu Sep 25, 2008 5:16 pm
Location: Dortmund, Germany

Postby pskink » Thu Jan 29, 2009 7:40 pm

darolla wrote:
pskink wrote:great! i'll add custom header to my repo...
do you have iphone's backbutton? but without any background (just button with transparency)?


looks like this I guess...


i mean something like this

http://dev.textcube.org/browser/sandbox ... Button.png

but backbutton

there is backbutton here
http://dev.textcube.org/browser/sandbox ... Button.png

but has blue background around it
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby darolla » Thu Jan 29, 2009 8:12 pm

lets try these: http://www.bittbox.com/freebies/72-free ... -and-bars/

then, photoshop, use the .ai file, doubleclick on layer, Color Overlay, Blend Mode Soft Light :)
Attachments
assorted_glass_bars.9.png
assorted_glass_bars.9.png (1.25 KiB) Viewed 3684 times
User avatar
darolla
Master Developer
Master Developer
 
Posts: 273
Joined: Thu Sep 25, 2008 5:16 pm
Location: Dortmund, Germany

Postby darolla » Thu Jan 29, 2009 8:18 pm

I've found these in .psd format
Attachments
hammer7.png
hammer7.png (23.7 KiB) Viewed 3683 times
tutorial-1.png
tutorial-1.png (34.97 KiB) Viewed 3683 times
button_glas_web20.png
button_glas_web20.png (126.61 KiB) Viewed 3683 times
psd.zip
(503.89 KiB) Downloaded 81 times
User avatar
darolla
Master Developer
Master Developer
 
Posts: 273
Joined: Thu Sep 25, 2008 5:16 pm
Location: Dortmund, Germany

Postby darolla » Thu Jan 29, 2009 8:56 pm

Attachments
metal_glass_button.9.png
metal_glass_button.9.png (5.94 KiB) Viewed 3679 times
User avatar
darolla
Master Developer
Master Developer
 
Posts: 273
Joined: Thu Sep 25, 2008 5:16 pm
Location: Dortmund, Germany

Postby pskink » Thu Jan 29, 2009 9:01 pm

ok, i got some images, see my repo in one hour
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby pskink » Thu Jan 29, 2009 10:37 pm

darolla, pls take a look into android-misc-widgets repo:

http://code.google.com/p/android-misc-widgets/

i dont know how you did it but i have 2px and 7 px padding in my title

in your example everything fits to the borders.
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby pskink » Thu Jan 29, 2009 11:18 pm

pskink wrote:darolla, pls take a look into android-misc-widgets repo:

http://code.google.com/p/android-misc-widgets/

i dont know how you did it but i have 2px and 7 px padding in my title

in your example everything fits to the borders.



ok, found it, the keyword here is:

android:windowTitleBackgroundStyle
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby pskink » Thu Jan 29, 2009 11:20 pm

darolla wrote:I've found these in .psd format


thanks,

but i dont have photoshop ;(
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Top
PreviousNext

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 6 guests