Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,809,424 Members 36,445 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
Gunthermic
Old
(Last edited by Gunthermic; 16th December 2013 at 09:51 AM.)
#1  
Gunthermic's Avatar
Recognized Contributor / Themer - OP
Thanks Meter 8,545
Posts: 3,047
Join Date: Mar 2011

 
DONATE TO ME
Default [MOD][HowTo] Samsung KeyBoard Swipe Color Change Found!

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:	645
Size:	185.7 KB
ID:	2455837   Click image for larger version

Name:	screenshot_2013-12-15_06-14-55.jpg
Views:	472
Size:	148.5 KB
ID:	2455839  


Wanna Chat? Looking for theming advice, answers..
Join me at -> guntherm66@gmail.com Use Gtalk to Join!
Team BlackOut Email: teamblackoutapps@gmail.com
Average Joes Team Memebers: Me, jonathanphx1, dan_joegibbsf, strongsteve
Team BlackOut Memebers: Me, B-Boy, DJ, Trapv and more
The Following 9 Users Say Thank You to Gunthermic For This Useful Post: [ Click to Expand ]
 
EMSpilot
Old
(Last edited by EMSpilot; 15th December 2013 at 09:51 PM.)
#2  
EMSpilot's Avatar
Recognized Themer
Thanks Meter 1,121
Posts: 621
Join Date: May 2012
Location: Havasu

 
DONATE TO ME
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


- - - - - - - - - - - - - - - - - - - - -

Device: Verizon GS5 SM-G900V & Tab S 8.4
Modem: G900VOYU1ANCG
ROM:MY OWN BUILD BASED OFF KOT49H.G900VOYU1ANCD FULLY DEODEXED
Nova Launcher 3.0.2 THEMED BY ME


- - - - - - - - - - - - - - - - - - - - -

ASU Sun Devil Theme & Alum!!!
Purple Green Jelly Bean Theme
MOAR MA6 Text Colors
The Following 5 Users Say Thank You to EMSpilot For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes