[Guides & Links] TOUCHWIZ UNIFIED MODS THREAD

Search This thread

Carotix

Recognized Themer
Jul 20, 2012
9,154
36,857
Ravenna
Help.
here many Dev and themers...
if I put noti background with less than 40% appear strange angle that cannot understand what is it....
more noti is down more big is angle.
see screen. appreciated any helps..
72afecbdc9aebc5c5fb2baa5f724d38b.jpg

6ff1dc97c3785e50a917aba0c107ca0a.jpg
@Carotix ( sorry for tag but I know that you are so good)
Inviato dal mio LG-D802 utilizzando Tapatalk
it's very strange ... did you change the padding side in dimensions.xml? try to put 0.0dip
like this
<dimen name="notification_side_padding">0.0dip</dimen>
 
Last edited:
  • Like
Reactions: renzetti.s

renzetti.s

Senior Member
Jun 15, 2012
2,205
2,327
sorry :( ... i use a png and don't use that mod
I try to explain better.
Notification in screen have background completely transparent.
have try to touch every in systemui but what I showed in screen never change.
read somewhere that in back of notification there is background view that is mostly colored... believe is my case. so if someone have experience on this or can check in studio will be great... if for example exist a way to modify background view...
tnx

Inviato dal mio LG-D802 utilizzando Tapatalk
 

claude96

Senior Member
Mar 18, 2010
1,454
2,460
Help.
here many Dev and themers...
if I put noti background with less than 40% appear strange angle that cannot understand what is it....
more noti is down more big is angle.
see screen. appreciated any helps..
72afecbdc9aebc5c5fb2baa5f724d38b.jpg

6ff1dc97c3785e50a917aba0c107ca0a.jpg
@Carotix ( sorry for tag but I know that you are so good)
Inviato dal mio LG-D802 utilizzando Tapatalk

Have you changed the values in : notification_material_bg_dim_round.xml & notification_material_bg_round.xml to more than 7.0dip !
 
  • Like
Reactions: renzetti.s

lijianjunyonghu

Senior Member
Jun 11, 2013
429
788
GUIDE - HOW TO ADD NETWORK TRAFFIC TINT ON LIGHT STATUS BAR

CREDITS TO @daxgirl for original mod!

First you will need to add <item type="id" name="network_traffic">false</item> to your ids.xml, you can call the id whatever you want just remember it

Second add the newly created id to res/layout/status_bar.xml, I have highlighted it here in blue, note it matches the id created <com.android.wubydax.NetworkTraffic android:id="@id/network_traffic" android:layout_width="wrap_content" android:layout_height="fill_parent" />

Third we will add this id in StatusbarIconController in the method noted below - addition noted in blue, I have included some code here as an example from my file - I also increased my locals to use the new way of adding ids without decompiling and recompiling systemUI. Please also add field mNetworkTraffic:Lcom/android/wubydax/NetworkTraffic;:

Code:
.method public constructor <init>(Landroid/content/Context;Landroid/view/View;Landroid/view/View;Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
    .locals 9
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "statusBar"    # Landroid/view/View;
    .param p3, "keyguardStatusBar"    # Landroid/view/View;
    .param p4, "phoneStatusBar"    # Lcom/android/systemui/statusbar/phone/PhoneStatusBar;

    .prologue
    .
    .
    .
    .

     .line 183
    iget-object v1, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mNotificationIcons:Lcom/android/systemui/statusbar/phone/IconMerger;

    iget-object v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mMoreIcon:Landroid/widget/ImageView;

    invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/IconMerger;->setOverflowIndicator(Landroid/view/View;)V

    .line 184
    invoke-virtual {p3, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/LinearLayout;

    iput-object v1, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mStatusIconsKeyguard:Landroid/widget/LinearLayout;

    .line 185
    invoke-virtual {p2, v6}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Lcom/android/systemui/BatteryMeterView;

    iput-object v1, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mBatteryMeterView:Lcom/android/systemui/BatteryMeterView;

  [COLOR="Blue"] const-string v7, "network_traffic"

    const-string v8, "id"

    invoke-static {v7, v8}, Lcom/android/wubydax/GearUtils;->getIdentifier(Ljava/lang/String;Ljava/lang/String;)I

    move-result v1
	
    invoke-virtual {p2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Lcom/android/wubydax/NetworkTraffic;

    iput-object v1, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mNetworkTraffic:Lcom/android/wubydax/NetworkTraffic;[/COLOR]

    .
    .
    .

Fourth in the same smali in .method private applyIconTint()V add the following (I added it just under he battery meter view section - but i have tried adding it other places and it works.

Code:
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mBatteryMeterView:Lcom/android/systemui/BatteryMeterView;

    iget v3, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mDarkIntensity:F

    invoke-virtual {v2, v3}, Lcom/android/systemui/BatteryMeterView;->setDarkIntensity(F)V
    #####
    [COLOR="Blue"]iget-object v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mNetworkTraffic:Lcom/android/wubydax/NetworkTraffic;

    iget v3, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mDarkIntensity:F

    invoke-virtual {v2, v3}, Lcom/android/wubydax/NetworkTraffic;->setDarkIntensity(F)V[/COLOR]

Fifth The rest of he work will be in the NetworkTraffic smali that was added from @daxgirl mod:

Add the following fields:

.field private mLightModeIconColorSingleTone:I

.field private mDarkModeIconColorSingleTone:I

.field private mDownloadTint:I

.field private mUploadTint:I

.field private mNetworkTrafficTint:I

.field private mNetworkTrafficArrowTint:I


sixth Same smali in .method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V add the following, I included additional code to show where added:

Code:
.   
. 
   const-string v3, "dimen"

    invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v2, v3, v4}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v2

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v2

    iput v2, p0, Lcom/android/wubydax/NetworkTraffic;->txtSizeMulti:I
    
    .line 231
    
   [COLOR="Blue"] const v2, 0x7f0a00ad ##make sure this agrees to your id for "dark_mode_icon_color_single_tone"

    invoke-virtual {p1, v2}, Landroid/content/Context;->getColor(I)I

    move-result v2

    iput v2, p0, Lcom/android/wubydax/NetworkTraffic;->mDarkModeIconColorSingleTone:I

    const v2, 0x7f0a00b1  ##make sure this agrees to your id for "light_mode_icon_color_single_tone"

    invoke-virtual {p1, v2}, Landroid/content/Context;->getColor(I)I

    move-result v2

    iput v2, p0, Lcom/android/wubydax/NetworkTraffic;->mLightModeIconColorSingleTone:I[/COLOR]

seventh Add the following private method which is really a copy past from StatusbarIconController smali - however PLEASE ENSURE to change the float in the bracket to (FII) since the evaluation method in the NetworkTraffic.smali is written slighly different, also make sure path is updated in appropriate spot to Lcom/android/wubydax/NetworkTraffic

Code:
[COLOR="blue"].method private getTintInternal(FII)I
    .locals 3

    invoke-static {}, Landroid/animation/ArgbEvaluator;->getInstance()Landroid/animation/ArgbEvaluator;

    move-result-object v0

    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    iget v2, p0, Lcom/android/wubydax/NetworkTraffic;->mDarkModeIconColorSingleTone:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v0, p1, v1, v2}, Landroid/animation/ArgbEvaluator;->evaluate(FLjava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    return v0
.end method[/COLOR]

eight in .method private updateSettings()V do the following, again I have included some code to show what I did. Since you are using the same NetworkTraffic smali it will be easy to find:

Code:
if-eqz v9, :cond_95

    .line 289
    [COLOR="Red"]#iget v9, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficColor:I #I have found that it works without this change[/COLOR]
    [COLOR="Blue"]iget v9, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficTint:I[/COLOR]

.
.
.local v8, "uploadColored":Landroid/text/SpannableString;
[COLOR="Red"]#    iget v9, p0, Lcom/android/wubydax/NetworkTraffic;->mUploadColor:I[/COLOR]
   [COLOR="Blue"] iget v9, p0, Lcom/android/wubydax/NetworkTraffic;->mUploadTint:I[/COLOR]

.
.
.local v2, "downloadColored":Landroid/text/SpannableString;
[COLOR="Red"]#    iget v9, p0, Lcom/android/wubydax/NetworkTraffic;->mDownloadColor:I[/COLOR]
   [COLOR="Blue"] iget v9, p0, Lcom/android/wubydax/NetworkTraffic;->mDownloadTint:I[/COLOR]

.
.

ninth in .method private updateTrafficDrawable()V do the following:

Code:
.
.
[COLOR="Red"]#    iget v2, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficColor:I[/COLOR]
   [COLOR="Blue"] iget v2, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficTint:I[/COLOR]
.
.
.
.
[COLOR="Red"]#    iget v2, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficArrowColor:I[/COLOR]
    [COLOR="Blue"]iget v2, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficArrowTint:I[/COLOR]

tenth add the following method at the bottom of smali:

Code:
[COLOR="Blue"].method public setDarkIntensity(F)V
    .locals 2
    .param p1, "darkIntensity"    # F

    .prologue
    .line 371
    iget v1, p0, Lcom/android/wubydax/NetworkTraffic;->mLightModeIconColorSingleTone:I

    iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficColor:I

    invoke-direct {p0, p1, v0, v1}, Lcom/android/wubydax/NetworkTraffic;->getTintInternal(FII)I

    move-result v0

    iput v0, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficTint:I
   
    iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficArrowColor:I

    invoke-direct {p0, p1, v0, v1}, Lcom/android/wubydax/NetworkTraffic;->getTintInternal(FII)I

    move-result v0

    iput v0, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficArrowTint:I
    
    iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mUploadColor:I

    invoke-direct {p0, p1, v0, v1}, Lcom/android/wubydax/NetworkTraffic;->getTintInternal(FII)I

    move-result v0

    iput v0, p0, Lcom/android/wubydax/NetworkTraffic;->mUploadTint:I
   
    iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mDownloadColor:I

    invoke-direct {p0, p1, v0, v1}, Lcom/android/wubydax/NetworkTraffic;->getTintInternal(FII)I

    move-result v0

    iput v0, p0, Lcom/android/wubydax/NetworkTraffic;->mDownloadTint:I

    .line 373
    invoke-direct {p0}, Lcom/android/wubydax/NetworkTraffic;->updateSettings()V

    .line 374
    return-void
.end method[/COLOR]

Note there is a bug on updating colors which will either require a systemUI restart of go from regular statusbar to light statusbar then after the tint animation the color updates - I am not an expert so not sure about this yet. Maybe an expert can help - @daxgirl I certainly hope you don't mind me messing up you mod! thanks in advance - please help with kinks?? Thanks. This was a lot of trial and error - of course with some understanding (a little...hahaha) of what i was doing

oh - also i had to make these access changes it would not work properly until i did, they are called in NetworkTraffic$1 smali:

Code:
.method static synthetic access$1200(Lcom/android/wubydax/NetworkTraffic;)I
    .registers 2
    .param p0, "x0"    # Lcom/android/wubydax/NetworkTraffic;

    .prologue
    .line 42
[COLOR="Red"]#    iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mDownloadColor:I[/COLOR]
    [COLOR="Blue"]iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mDownloadTint:I[/COLOR]

    return v0
.end method

Code:
.method static synthetic access$900(Lcom/android/wubydax/NetworkTraffic;)I
    .registers 2
    .param p0, "x0"    # Lcom/android/wubydax/NetworkTraffic;

    .prologue
    .line 42
[COLOR="Red"]#    iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mUploadColor:I[/COLOR]
   [COLOR="Blue"] iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mUploadTint:I[/COLOR]

    return v0
.end method

Can share your smali:)
 
K

kbythwood

Guest
I followed the guide from @daxgirl for Rounded Notification
I cant figer out what is causing this
When change from stock shape to round shape
I lose all text and the fuction to even customize notification panel
Any one got any ideas what could be causing this?
 

Attachments

  • 20161008_101850.png
    20161008_101850.png
    71 KB · Views: 334
  • Screenshot_20161008-101521.jpg
    Screenshot_20161008-101521.jpg
    105.5 KB · Views: 330

asc1977

Senior Member
Apr 15, 2012
5,330
6,989
Schwetzingen
I followed the guide from @daxgirl for Rounded Notification
I cant figer out what is causing this
When change from stock shape to round shape
I lose all text and the fuction to even customize notification panel
Any one got any ideas what could be causing this?
Why you ask in both threads. I answered you in other thread. So its not nessesary to ask on other place. You must rewrite the guide for ux. Old one not work
 

daxgirl

Senior Member
Jun 30, 2012
4,047
9,175
Jerusalem
You didnt give me the answer
My goal is the answer
If you don't have the answer
Don't reply????????

I gave you the answer. You asked what causing that. I answered that that guide never work on ux. No one get it to work of all devs i know. And thats a lot. Maybe @daxgirl can help. To much changes in this place on ux

Guys you're not kids. You're on development thread. The guide doesn't work - adapt it. That's the LEAST you can try when someone already did the work from scratch for you. Sure I can do that. It's quite easy. But for so many reasons, I think I really shouldn't. Despite huge effort to make guides comprehensive so people understand what they are doing, I come here (rarely enough, I admit) and see that nothing changes. I am sure someone can make it work on grace ux. it's still android. Miss ya all guys!!! keeping busy these days!!!
 

Top Liked Posts