[All Carriers]Touch Wiz Themeing Questions

Swiftks

Retired Forum Moderator
Mar 16, 2011
3,741
1,910
0
The Woodlands, TX
Wanted to see if someone could help me with this...

I am trying to center my status bar clock, but also have it "disappear" when I get a notification. Just like it does normally. I have the clock centered, but when a notification pops up, only the battery, signal bars, etc. disappear, and the notification text is overlapped on top of the clock. Below is the my current tw_stats_bar.xml (center clock in bold/red):

Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView android:orientation="vertical" android:background="@drawable/status_bar_background" android:focusable="true" android:descendantFocusability="afterDescendants"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    [B][COLOR="red"]<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
        <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:paddingTop="3.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_weight="1.0" />
    </LinearLayout>[/COLOR][/B]
    <LinearLayout android:orientation="horizontal" android:id="@id/icons" android:paddingLeft="6.0dip" android:paddingRight="6.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent">
        <LinearLayout android:orientation="horizontal" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
            <com.android.systemui.statusbar.phone.CarrierLabel android:gravity="center_vertical" android:id="@id/carrierLabel" android:background="#ff000000" android:paddingLeft="0.0dip" android:paddingRight="0.0dip" android:layout_width="0.0dip" android:layout_height="0.0dip" android:singleLine="true" />
            <ImageView android:id="@id/doNotDisturbIcon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/tw_dnd" />
            <com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
            <com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentLeft="true" />
        </LinearLayout>
        <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
        <LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
            <include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/tw_signal_cluster_view" />
            <TextView android:textSize="12.0dip" android:textColor="#ffa6a6a6" android:layout_gravity="center" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_network_name_separator" />
            <ImageView android:gravity="center" android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="wrap_content" />
        </LinearLayout>
    </LinearLayout>
    <LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
        <ImageSwitcher android:id="@id/tickerIcon" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:layout_marginRight="4.0dip">
            <com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="centerInside" />
            <com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="centerInside" />
        </ImageSwitcher>
        <com.android.systemui.statusbar.phone.TickerView android:id="@id/tickerText" android:paddingTop="2.0dip" android:paddingRight="10.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="1.0">
            <TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:id="@id/ticker_text_view_old" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
            <TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:id="@id/ticker_text_view_new" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
        </com.android.systemui.statusbar.phone.TickerView>
    </LinearLayout>
</com.android.systemui.statusbar.phone.PhoneStatusBarView>

I have also tried adding android:id="@id/icons as follows, but this results in the clock being centered and disappearing like it should, but all other icons on the right side (signal bars, battery, etc.) not disappearing, and thus they are overlapped with the notification text. :mad:

Code:
<LinearLayout [B][COLOR="Red"]android:id="@id/icons[/COLOR][/B] android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
        <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:paddingTop="3.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_weight="1.0" />
    </LinearLayout>

Thanks for your help.
in your first block of text, did you try just centering one of those instead of both? i wanna say the center on the policy.Clock is just centering it in it's block, while LinearLayout center should actually center it on the status bar... (or this could be vice versa)
you shouldn't need to mess with the second block at all since you're just trying to get the clock itself centered.

Here's how to center the clock and also make it disappear when there's a notification:

Had to change this line in my tw_status_bar.xml from this:

<LinearLayout android:eek:rientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">​

To This:

<LinearLayout android:eek:rientation="horizontal" android:id="@id/ticker" android:background="@drawable/status_bar_bg_tile" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">​


Also, here's how I removed my AM/PM from the status bar clock.
http://forum.xda-developers.com/showthread.php?t=1591362

Anyone know any other way to remove the AM/PM? I compared my original clock.smali to a themes that already had removed the AM/PM, and they where the same. The above edit worked for me, but I was just curious if it was something I missed in a .xml somewhere.

Also, where's the color for "No Notifications" text in notification window located at? Thought it was in values/styles.xml

- Thanks


**Edit**

Nottach, good to see you around here. I still refer to your Atrix "How to Port a Theme... the Nottach way" thread all the time. :p
 

alirulzz

Senior Member
Sep 2, 2011
171
3
0
i was wondering.. i wanted to make a custom icon for an app. ive made few for iphone before but have no idea how to do so here... can someone guide me please? thanks
 

mrvirginia

Senior Member
Jun 12, 2010
4,403
2,699
0
36
Charlotte, NC
Clock color

okay, so i booted my GNex to find no AM/PM there so naturally i wanted to remove this from my status bar on the S3. while i was doing that, i figured i'd change the color of my clock back to ICS as well. removing AM/PM worked, but the steps for changing the clock color did not. it was pretty simple to find once i booted up and realized this.

to change the clock color, do the following instead:
in the SystemUI.apk, nav to res\layout\tw_status_bar.xml
find com.android.systemui.statusbar.policy.Clock
and change
android:textColor="#ff959595" to whatever color.

for ICS
android:textColor="#ff33b5e5"

---------- Post added at 07:08 PM ---------- Previous post was at 07:03 PM ----------

i was wondering.. i wanted to make a custom icon for an app. ive made few for iphone before but have no idea how to do so here... can someone guide me please? thanks
do you mean for where to put an icon to make it change?
i'm actually about to start doing this myself for my theme update tomorrow.
 

shane6374

Senior Member
Jun 23, 2009
2,802
1,261
0
Minneapolis
i was wondering.. i wanted to make a custom icon for an app. ive made few for iphone before but have no idea how to do so here... can someone guide me please? thanks
There are a couple different methods depending on what you want to accomplish. If you're just looking to change it on the home screen, certain launchers allow you to do that. Not sure if anyone has tried metamorph yet on here, but I would imagine that would work. If you are on a deodexed rom you could easily pull the apk (I suggest root explorer so you don't have to mess with abd) and change the icon using 7zip then push it back to the phone. More explanation can be provided once we know your exact goals.
 

alirulzz

Senior Member
Sep 2, 2011
171
3
0
There are a couple different methods depending on what you want to accomplish. If you're just looking to change it on the home screen, certain launchers allow you to do that. Not sure if anyone has tried metamorph yet on here, but I would imagine that would work. If you are on a deodexed rom you could easily pull the apk (I suggest root explorer so you don't have to mess with abd) and change the icon using 7zip then push it back to the phone.
Thank you for your response. I am deodexed. So my new qs to you is what folder are the apk's located in? also how will i push it back to the phone??

finally what format are the icon pictures supposed to be in? and what are the dimensions supposed to be? thanks.

---------- Post added at 07:23 PM ---------- Previous post was at 07:17 PM ----------

---------- Post added at 07:08 PM ---------- Previous post was at 07:03 PM ----------

[/COLOR]

do you mean for where to put an icon to make it change?
i'm actually about to start doing this myself for my theme update tomorrow.[/QUOTE]

yup i do mean where to put an icon to make it change.. i found a theme on go launcher ex.. and it is pretty nice looking but the problem is most of the apps are not supported by the theme so they show up as a regular image, thus i am trying to get it so that all the icons look like the modified images.. can you help me out? thanks\

P.S. i am not really good with editing images using gimp or whatever
 

mrvirginia

Senior Member
Jun 12, 2010
4,403
2,699
0
36
Charlotte, NC
yup i do mean where to put an icon to make it change.. i found a theme on go launcher ex.. and it is pretty nice looking but the problem is most of the apps are not supported by the theme so they show up as a regular image, thus i am trying to get it so that all the icons look like the modified images.. can you help me out? thanks\

P.S. i am not really good with editing images using gimp or whatever
there's lots of icon packs around the forums here. some are free, some cost money.

to edit icons, you need to first download 7zip. after you've done that, here's a quick guide.

i'm just going to pick a system app as an example, SecMMS.apk. this is our messaging app. copy this file from your /system/app to your sd card (root explorer can get this done for you). copy the app onto your computer. using 7zip, "Open Archive". navigate to res\drawable-sw359dp-xhdpi. what you want to change is ic_launcher_smsmms.png. this is the icon. now copy this back to your phone, then use root explorer on your phone to put back in /system/app. you don't even need to change permissions here. pretty sure you can just reboot. done. i know this works because i just did it.

 

shane6374

Senior Member
Jun 23, 2009
2,802
1,261
0
Minneapolis
Thank you for your response. I am deodexed. So my new qs to you is what folder are the apk's located in? also how will i push it back to the phone??

finally what format are the icon pictures supposed to be in? and what are the dimensions supposed to be? thanks.
The easiest way it with root explorer. You can navigate to the system/app and data/app folder to find all the apks. Copy them to you sdcard (make sure you keep a backup copy of the original too), then connect to your computer, go to the sd card and open the apks with 7zip. The icons are normally in the res/drawable-xhdpi or mipmap-xhdpi folder (check mipmap first). If not there check the hdpi folders. You can then name your icon the same as the original and drop it in the zip. xhdpi icons are 96x96px, hdpi icons are 72x72px. Once done, go back to the phone and copy the edited apks back to where you got them from and restart the phone.
 

mrvirginia

Senior Member
Jun 12, 2010
4,403
2,699
0
36
Charlotte, NC
The easiest way it with root explorer. You can navigate to the system/app and data/app folder to find all the apks. Copy them to you sdcard (make sure you keep a backup copy of the original too), then connect to your computer, go to the sd card and open the apks with 7zip. The icons are normally in the res/drawable-xhdpi or mipmap-xhdpi folder (check mipmap first). If not there check the hdpi folders. You can then name your icon the same as the original and drop it in the zip. xhdpi icons are 96x96px, hdpi icons are 72x72px. Once done, go back to the phone and copy the edited apks back to where you got them from and restart the phone.
just so no one is confused, what Shane said is correct too, in regards to the folders. it depends on the app you're working with. in my case, it was the folder i listed, even though that same icon is also located in drawable-xhdpi (changing this one had no effect).
 

shane6374

Senior Member
Jun 23, 2009
2,802
1,261
0
Minneapolis
just so no one is confused, what Shane said is correct too, in regards to the folders. it depends on the app you're working with. in my case, it was the folder i listed, even though that same icon is also located in drawable-xhdpi (changing this one had no effect).
Yes, there is no perfect science to this. You just have to explore and change until you get it, and get used to trial and error.
 

alirulzz

Senior Member
Sep 2, 2011
171
3
0
there's lots of icon packs around the forums here. some are free, some cost money.

to edit icons, you need to first download 7zip. after you've done that, here's a quick guide.

i'm just going to pick a system app as an example, SecMMS.apk. this is our messaging app. copy this file from your /system/app to your sd card (root explorer can get this done for you). copy the app onto your computer. using 7zip, "Open Archive". navigate to res\drawable-sw359dp-xhdpi. what you want to change is ic_launcher_smsmms.png. this is the icon. now copy this back to your phone, then use root explorer on your phone to put back in /system/app. you don't even need to change permissions here. pretty sure you can just reboot. done. i know this works because i just did it.

i actually also wanted to change my messaging app icon.. can you tell me what icon pack you used to get this messaging icon? thanks.muchh appreciated.
 

Jirv311

Senior Member
Mar 30, 2008
1,133
302
0
Johnstown
Easiest way to remove carrier label that Ive found is to add android:maxLength"0" attribute to tw_status_bar.

Code:
<com.android.systemui.statusbar.phone.CarrierLabel android:gravity="center_vertical" android:id="@id/carrierLabel" android:background="#ff000000" android:paddingLeft="4.0dip" android:paddingRight="4.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" [COLOR="Red"]android:maxLength="0"[/COLOR] />
Nottach? Whatter you doing here? Haha good to see you around here man. :D
 

Swiftks

Retired Forum Moderator
Mar 16, 2011
3,741
1,910
0
The Woodlands, TX
So I'm finally done with my SystemUI... just in time to start all over again with AOKP :eek:

But I have one little annoying nag... I originally based my systemui off one of Tiffany's builds in the ICS Domination thread. Can anyone tell me which xml has the settings for Notification line in the below screen shot (probably tw_status_bar_expanded). There is a little annoying something??? at the far edge. Don't know if it's a left over typo, the padding is wrong???? Any ideas?

Thanks

 

shane6374

Senior Member
Jun 23, 2009
2,802
1,261
0
Minneapolis
So I'm finally done with my SystemUI... just in time to start all over again with AOKP :eek:

But I have one little annoying nag... I originally based my systemui off one of Tiffany's builds in the ICS Domination thread. Can anyone tell me which xml has the settings for Notification line in the below screen shot (probably tw_status_bar_expanded). There is a little annoying something??? at the far edge. Don't know if it's a left over typo, the padding is wrong???? Any ideas?

Thanks
If that's the clear text check this in the tw_status_bar_expanded.xml

Code:
 <TextView android:textSize="@dimen/status_bar_expanded_notification_clear_button_text_size" android:textColor="@color/tw_status_bar_clear_btn_text" android:gravity="center" android:id="@id/clear_all_button" android:background="@drawable/tw_btn_default_small" android:padding="0.100000024dip" android:focusable="true" android:clickable="true" android:layout_width="@dimen/status_bar_expanded_clear_button_width" android:layout_height="fill_parent" android:layout_marginRight="4.0dip" android:text="@string/status_bar_clear_all_button" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
Maybe try adding the string android:visibility="gone"