[MOD][HowTo] Samsung KeyBoard Swipe Color Change Found!

Search This thread

Gunthermic

Retired Forum Moderator
Mar 19, 2011
3,534
12,584
Okay, alot of dev's/themers been looking for this one...

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

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

Look for:
smali\com\diotek\ime\framework\view\AbstractKeyBoardView.smali

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

Code:
.method private setTracePaintOptionsWithSettings()V
    .locals 5

    .prologue
    const/16 v4, 0xff

    const/4 v1, 0x1

    const/4 v3, 0x0

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

    if-nez v0, :cond_0

    .line 9830
    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 9832
    :cond_0
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;

    if-eqz v0, :cond_1

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

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

    .line 9835
    :cond_1
    iput-short v3, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePointCount:S

    .line 9836
    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 9837
    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 9838
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    const/16 v1, 0xa5

    const/16 v2, 0xf3

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


Click to see what to change:

Code:
.method private setTracePaintOptionsWithSettings()V
    .locals 5

    .prologue
    const/16 v4, [B][U][COLOR="Blue"]0xff[/COLOR][/U][/B] [B][COLOR="seagreen"]Change for Alpha Value - "0xff" [/COLOR][/B]

    const/4 v1, 0x1 

    const/4 v3, [B][U][COLOR="Blue"]0x0[/COLOR][/U][/B] [B][COLOR="seaGreen"] - Change for Red Value - "0x0"[/COLOR][/B]

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

    if-nez v0, :cond_0

    .line 9830
    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 9832
    :cond_0
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;

    if-eqz v0, :cond_1

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

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

    .line 9835
    :cond_1
    iput-short v3, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePointCount:S

    .line 9836
    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 9837
    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 9838
    iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;

    const/16 v1, [B][U][COLOR="Blue"]0xa5[/COLOR][/U][/B] [COLOR="seagreen"]- Change for Green Value - "0xa5"[/COLOR]

    const/16 v2, [B][U][COLOR="Blue"]0xf3[/COLOR][/U][/B] [COLOR="seagreen"] - Change for Blue Value - "0xf3"[/COLOR]

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


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!!!!



A Little clarification on Instructions.
I was swamped with questions on how to edit and such.. So with @strongsteve help we dug more and here is an easier way to get your colors instead of trying to use RGB values..

Note III - Edits

change code:

Code:
const/16 v1, 0xa5

const/16 v2, 0xf3

to

Code:
const v3, 0x33 

const v1, 0x66 

const v2, 0xcc

Note II - Edits

change code:

Code:
const/16 v1, 0xff

const/16 v2, 0xa5

const/16 v3, 0xf3

change to:

Code:
const/16 v1, 0xff

const v2, 0x66

const v3, 0xcc

const v4, 0x33

Then just use any normal Hex Color code you would normally use!!!
In the above example I used 3366cc which is DarkHorse Blue..

I hope that helps

Text Color in Text Editor(Second Screen Shot)

Note III

Search for
Code:
constructor <init>(Lcom/visionobjects/textwidget/e/a;Landroid/util/DisplayMetrics;)V

and then look for:

Code:
const/high16 v1, -0x100   <--- Black Text Color Previous Typed Word 

const v2, -0xcc4a1b          <--- Last Typed Word

Change Black Text to a Smali Color Code
Change Last Typed Word to Smali Color code (-0xcc4a1b)

For example:
3366cc converts to -0xCC9934 for smali color codes


Thx to @EMSpilot for pointing out the Black Text Line... Thank you!!!
 

Attachments

  • screenshot_2013-12-13_05-02-26.jpg
    screenshot_2013-12-13_05-02-26.jpg
    185.7 KB · Views: 944
  • screenshot_2013-12-15_06-14-55.jpg
    screenshot_2013-12-15_06-14-55.jpg
    148.5 KB · Views: 746
Last edited:

EMSpilot

Inactive Recognized Themer
May 31, 2012
1,105
2,054
Show Low
Black Text Color

If you want to take it a step further the line just below const v2, -0xcc4a1b is

const/high16 v1, -0x100 this is the black text color that shows up when you move on to the next word.

Change it to const v1, "put your color code here" I used -0x4cf0 which is ffb310 in hex. The finished line looks like this const v1, -0x4cf0

Great Job Michael. Your work is greatly appreciated!!!

BTW for me the smali was located here.

SamsungIME\smali\com\visionobjects\textwidget\f\b\a.smali
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    Okay, alot of dev's/themers been looking for this one...

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

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

    Look for:
    smali\com\diotek\ime\framework\view\AbstractKeyBoardView.smali

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

    Code:
    .method private setTracePaintOptionsWithSettings()V
        .locals 5
    
        .prologue
        const/16 v4, 0xff
    
        const/4 v1, 0x1
    
        const/4 v3, 0x0
    
        .line 9829
        iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
    
        if-nez v0, :cond_0
    
        .line 9830
        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 9832
        :cond_0
        iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;
    
        if-eqz v0, :cond_1
    
        .line 9833
        iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;
    
        invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
    
        .line 9835
        :cond_1
        iput-short v3, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePointCount:S
    
        .line 9836
        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 9837
        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 9838
        iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
    
        const/16 v1, 0xa5
    
        const/16 v2, 0xf3
    
        invoke-static {v4, v3, v1, v2}, Landroid/graphics/Color;->argb(IIII)I


    Click to see what to change:

    Code:
    .method private setTracePaintOptionsWithSettings()V
        .locals 5
    
        .prologue
        const/16 v4, [B][U][COLOR="Blue"]0xff[/COLOR][/U][/B] [B][COLOR="seagreen"]Change for Alpha Value - "0xff" [/COLOR][/B]
    
        const/4 v1, 0x1 
    
        const/4 v3, [B][U][COLOR="Blue"]0x0[/COLOR][/U][/B] [B][COLOR="seaGreen"] - Change for Red Value - "0x0"[/COLOR][/B]
    
        .line 9829
        iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
    
        if-nez v0, :cond_0
    
        .line 9830
        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 9832
        :cond_0
        iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;
    
        if-eqz v0, :cond_1
    
        .line 9833
        iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;
    
        invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
    
        .line 9835
        :cond_1
        iput-short v3, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePointCount:S
    
        .line 9836
        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 9837
        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 9838
        iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
    
        const/16 v1, [B][U][COLOR="Blue"]0xa5[/COLOR][/U][/B] [COLOR="seagreen"]- Change for Green Value - "0xa5"[/COLOR]
    
        const/16 v2, [B][U][COLOR="Blue"]0xf3[/COLOR][/U][/B] [COLOR="seagreen"] - Change for Blue Value - "0xf3"[/COLOR]
    
        invoke-static {v4, v3, v1, v2}, Landroid/graphics/Color;->argb(IIII)I


    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!!!!



    A Little clarification on Instructions.
    I was swamped with questions on how to edit and such.. So with @strongsteve help we dug more and here is an easier way to get your colors instead of trying to use RGB values..

    Note III - Edits

    change code:

    Code:
    const/16 v1, 0xa5
    
    const/16 v2, 0xf3

    to

    Code:
    const v3, 0x33 
    
    const v1, 0x66 
    
    const v2, 0xcc

    Note II - Edits

    change code:

    Code:
    const/16 v1, 0xff
    
    const/16 v2, 0xa5
    
    const/16 v3, 0xf3

    change to:

    Code:
    const/16 v1, 0xff
    
    const v2, 0x66
    
    const v3, 0xcc
    
    const v4, 0x33

    Then just use any normal Hex Color code you would normally use!!!
    In the above example I used 3366cc which is DarkHorse Blue..

    I hope that helps

    Text Color in Text Editor(Second Screen Shot)

    Note III

    Search for
    Code:
    constructor <init>(Lcom/visionobjects/textwidget/e/a;Landroid/util/DisplayMetrics;)V

    and then look for:

    Code:
    const/high16 v1, -0x100   <--- Black Text Color Previous Typed Word 
    
    const v2, -0xcc4a1b          <--- Last Typed Word

    Change Black Text to a Smali Color Code
    Change Last Typed Word to Smali Color code (-0xcc4a1b)

    For example:
    3366cc converts to -0xCC9934 for smali color codes


    Thx to @EMSpilot for pointing out the Black Text Line... Thank you!!!
    5
    Black Text Color

    If you want to take it a step further the line just below const v2, -0xcc4a1b is

    const/high16 v1, -0x100 this is the black text color that shows up when you move on to the next word.

    Change it to const v1, "put your color code here" I used -0x4cf0 which is ffb310 in hex. The finished line looks like this const v1, -0x4cf0

    Great Job Michael. Your work is greatly appreciated!!!

    BTW for me the smali was located here.

    SamsungIME\smali\com\visionobjects\textwidget\f\b\a.smali