Post Reply

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

OP Gunthermic

14th December 2013, 02:02 PM   |  #1  
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\AbstractKeyBoa rdView.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, 0xff Change for Alpha Value - "0xff" 

    const/4 v1, 0x1 

    const/4 v3, 0x0  - Change for Red Value - "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 - Change for Green Value - "0xa5"

    const/16 v2, 0xf3  - Change for Blue Value - "0xf3"

    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!!!
Attached Thumbnails
Click image for larger version

Name:	screenshot_2013-12-13_05-02-26.jpg
Views:	665
Size:	185.7 KB
ID:	2455837   Click image for larger version

Name:	screenshot_2013-12-15_06-14-55.jpg
Views:	481
Size:	148.5 KB
ID:	2455839  
Last edited by Gunthermic; 16th December 2013 at 09:51 AM.
The Following 9 Users Say Thank You to Gunthermic For This Useful Post: [ View ]
15th December 2013, 06:56 PM   |  #2  
EMSpilot's Avatar
Recognized Themer
Flag Havasu
Thanks Meter: 1,223
 
660 posts
Join Date:Joined: May 2012
Donate to Me
More
Angry 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 by EMSpilot; 15th December 2013 at 09:51 PM.
The Following 5 Users Say Thank You to EMSpilot For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Sprint Galaxy Note II Android Development by ThreadRank