FORUMS
Remove All Ads from XDA

[MOD][THEME][APP][TUTORIAL] Samsung KeyBoard Swipe Color Change Found!

4,692 posts
Thanks Meter: 31,789
 
By JoshBeach, Inactive Recognized Developer / Recognized Themer on 14th December 2013, 05:38 AM
Post Reply Email Thread
Thanks to @Gunthermic for finding this.. confirmed working on Note2 as well...

Quote:
Originally Posted by Gunthermic

Okay, alot of dev's/themers been looking for this one...

If you use, please give credit, I spent many hours finding this Mod... Dont take credit for someone else's work...

This Mod will allow you to change the Samsung KeyBoard Swipe Color..(SamsungIME.apk)

Look for:
smalicomdiotekimeframeworkviewAbstractKeyBoardView .smali

Search for -> .method private setTracePaintOptionsWithSettings()V
Click to see Org Code


Code:
.method private setTracePaintOptionsWithSettings()V
    .registers 6

    .prologue
    const/4 v1, 0x1

    const/4 v4, 0x0

    .line 7006
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    if-nez v0, :cond_d

    .line 7007
    new-instance v0, Landroid/graphics/Paint;

    invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V

    iput-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    .line 7009
    :cond_d
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;

    if-eqz v0, :cond_16

    .line 7010
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    .line 7012
    :cond_16
    iput-short v4, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePointCount:S

    .line 7013
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 7014
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setDither(Z)V

    .line 7015
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    const/16 v1, 0xff

    const/16 v2, 0xa5

    const/16 v3, 0xf3

    invoke-static {v1, v4, v2, v3}, Landroid/graphics/Color;->argb(IIII)I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    .line 7016
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    sget-object v1, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 7017
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    sget-object v1, Landroid/graphics/Paint$Join;->ROUND:Landroid/graphics/Paint$Join;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeJoin(Landroid/graphics/Paint$Join;)V

    .line 7018
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    sget-object v1, Landroid/graphics/Paint$Cap;->ROUND:Landroid/graphics/Paint$Cap;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeCap(Landroid/graphics/Paint$Cap;)V

    .line 7019
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    const/16 v1, 0x96

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setAlpha(I)V

    .line 7020
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    iget v1, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePenThickness:I

    int-to-float v1, v1

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    .line 7021
    return-void
.end method


Click to see what to change:

Code:
.method private setTracePaintOptionsWithSettings()V
    .registers 6

    .prologue
    const/4 v1, 0x1

    const/4 v4, 0x0   # This is your Red Value

    .line 7006
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    if-nez v0, :cond_d

    .line 7007
    new-instance v0, Landroid/graphics/Paint;

    invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V

    iput-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    .line 7009
    :cond_d
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;

    if-eqz v0, :cond_16

    .line 7010
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    .line 7012
    :cond_16
    iput-short v4, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePointCount:S

    .line 7013
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 7014
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setDither(Z)V

    .line 7015
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    const/16 v1, 0xff

    const/16 v2, 0xa5 # This is your Green Value

    const/16 v3, 0xf3 # this is your Blue Value

    invoke-static {v1, v4, v2, v3}, Landroid/graphics/Color;->argb(IIII)I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    .line 7016
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    sget-object v1, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 7017
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    sget-object v1, Landroid/graphics/Paint$Join;->ROUND:Landroid/graphics/Paint$Join;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeJoin(Landroid/graphics/Paint$Join;)V

    .line 7018
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    sget-object v1, Landroid/graphics/Paint$Cap;->ROUND:Landroid/graphics/Paint$Cap;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeCap(Landroid/graphics/Paint$Cap;)V

    .line 7019
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    const/16 v1, 0x96

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setAlpha(I)V

    .line 7020
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    iget v1, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePenThickness:I

    int-to-float v1, v1

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    .line 7021
    return-void
.end method


So what it boils down to is that the Swipe Color is what we call RGB color coding. I suggest a site like this to see values you can use:

Hex to RGB Color converter

Thats it folks.. swipe color squashed!!!!

Verified to work on N2 KeyBoards



XDA:DevDB Information
Samsung KeyBoard Swipe Color Change Found! , a ROM for the Sprint Samsung Galaxy Note II

Contributors
JoshBeach, Gunthermic

Version Information
Status: Testing

Created 2013-12-14
Last Updated 2014-04-15
The Following 2 Users Say Thank You to JoshBeach For This Useful Post: [ View ] Gift JoshBeach Ad-Free
 
 
14th December 2013, 12:32 PM |#2  
Naddict's Avatar
Senior Member
Flag 28.2S, 92.1W
Thanks Meter: 13,908
 
More
IT WORKS!

Thanks to both of you guys !

Hey all, @JoshBeach is graciously going to defer to the original discoverer of the mod, @Gunthermic, to continue the discussion here http://forum.xda-developers.com/show....php?t=2569480.
The Following User Says Thank You to Naddict For This Useful Post: [ View ] Gift Naddict Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes