Jump to content


Photo

How to Change color of "Clear" button?

- - - - -

  • Please log in to reply
10 replies to this topic

#1
5yuan

5yuan

    Newbie

  • Members
  • Pip
  • 7 posts
Hi all. I have been working on making the notif bar all stock. I've replaced all graphics for the black notification bar, and have everything looking stock, except the clear button. I cannot find it anywhere. I have also looked in the .xml files in services.jar but maybe I am missing it?

This is what it looks like so far:

I really wish I could figure out this "Clear" button. Can anyone help or have any information on it? Thanks in advance!

Attached File  123.jpg   104.03KB   43 downloads

  • 0

#2
Frankish

Frankish

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 3,536 posts
  • Gender:Male
  • Devices:iPhone 4S Xiaocai X9 THL W200
Is it not just btn_default_normal.9.png or one of the files associated with it?

  • 0

#3
Mike_P

Mike_P

    Regular

  • Members
  • PipPip
  • 86 posts
  • Location:UK
  • Devices:Orange San Francisco
I believe it's the btn_default_small PNGs.

  • 0

#4
Frankish

Frankish

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 3,536 posts
  • Gender:Male
  • Devices:iPhone 4S Xiaocai X9 THL W200

I believe it's the btn_default_small PNGs.


Yeah that's gotta be the ones but if you change them some menus might look strange as it's a shared image isn't it.

  • 0

#5
5yuan

5yuan

    Newbie

  • Members
  • Pip
  • 7 posts
Modify it ?

btn_default_small.xml

<TextView android:textSize="14.0sp" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:background="@drawable/btn_default_small" android:paddingLeft="15.0dip" android:paddingRight="15.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4.0dip" android:layout_marginBottom="1.0dip" android:text="@string/status_bar_clear_all_button" style="\?buttonStyle" />
	</LinearLayout>

  • 0

#6
Frankish

Frankish

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 3,536 posts
  • Gender:Male
  • Devices:iPhone 4S Xiaocai X9 THL W200

Modify it ?

btn_default_small.xml

<TextView android:textSize="14.0sp" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:background="@drawable/btn_default_small" android:paddingLeft="15.0dip" android:paddingRight="15.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4.0dip" android:layout_marginBottom="1.0dip" android:text="@string/status_bar_clear_all_button" style="\?buttonStyle" />
	</LinearLayout>


That's not the route to take. Do you want to change just the text colour or the actually button image colour? For the image you need to be in drawable-hdpi.

  • 0

#7
5yuan

5yuan

    Newbie

  • Members
  • Pip
  • 7 posts

That's not the route to take. Do you want to change just the text colour or the actually button image colour? For the image you need to be in drawable-hdpi.


Thanks ;)

I'm trying to change the actual button color from white to black .

btn_default_small.png has been in the hdpi drawable directory , but No change。

rom for Jellyfish RLS9

Attached File  btn_default_small.png   40.89KB   4 downloads

Edited by 5yuan, 30 January 2011 - 12:49 PM.

  • 0

#8
Mike_P

Mike_P

    Regular

  • Members
  • PipPip
  • 86 posts
  • Location:UK
  • Devices:Orange San Francisco
It's not just 1 image though, there are 5, btn_default_small is just the prefix, look in your drawable-hdpi folder. Each image covers the different states, focus/selected/pressed etc.

  • 0

#9
5yuan

5yuan

    Newbie

  • Members
  • Pip
  • 7 posts

It's not just 1 image though, there are 5, btn_default_small is just the prefix, look in your drawable-hdpi folder. Each image covers the different states, focus/selected/pressed etc.


Frankish,Mike_P
TKS! ;)

i get it 。

only change
btn_default_smail_normal.9.png
btn_default_smail_normal.disable.9.png

Attached File  444.jpg   87.51KB   17 downloads

  • 0

#10
Frankish

Frankish

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 3,536 posts
  • Gender:Male
  • Devices:iPhone 4S Xiaocai X9 THL W200

Frankish,Mike_P
TKS! ;)

i get it 。

only change
btn_default_smail_normal.9.png
btn_default_smail_normal.disable.9.png

Attached File  444.jpg   87.51KB   17 downloads


Looks wonderful. Have you noticed it affecting any other buttons within the UI?

  • 0

#11
5yuan

5yuan

    Newbie

  • Members
  • Pip
  • 7 posts

Looks wonderful. Have you noticed it affecting any other buttons within the UI?



affecting buttons:

state_window_focused
state_enable
state_focused
drawable


to Modify btn_default_small.xml
android:background="@drawable/btn_default_small"

is the best way .

but how to modify? i have problems withe "apktool b ".

Edited by 5yuan, 31 January 2011 - 06:11 AM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users