Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,812,642 Members 44,377 Now Online
XDA Developers Android and Mobile Development Forum

[MOD] Inverted Full Screen KeyBoard/Text edit(Landscape)

Tip us?
 
Gunthermic
Old
(Last edited by Gunthermic; 3rd May 2014 at 03:40 PM.)
#1  
Gunthermic's Avatar
Recognized Contributor / Themer - OP
Thanks Meter 8,554
Posts: 3,047
Join Date: Mar 2011

 
DONATE TO ME
Default [MOD] Inverted Full Screen KeyBoard/Text edit(Landscape)

Finally tracked this one down, and just have to share this...

This Mod was found by @EMSpilot and @Gunthermic.. emspilot found the routine, and from there we figured the rest.. Give him a big kudos..

This is a MOD for Dev's to incorperate, this is NOT an End User MOD.

I have broken this down to each part of the inversion for those that want complete control over the Full Screen KeyBoard Layout.

1. Text Color
2. Cusor Color
3. BackGround Color
4. HighLight Color

What:
Framework.jar
framework-res.apk

Decompile Framework.jar file

Add/Change
Subtract/Delete


Go to:
smali\android\inputmethodservice\InputMethodServic e.smali

Search for:

.method startExtractingText(Z)V

Look for this code:
1. Text Color:
Code:
iget-object v8, v2, Landroid/view/inputmethod/EditorInfo;->hintText:Ljava/lang/CharSequence;

    invoke-virtual {v1, v8}, Landroid/inputmethodservice/ExtractEditText;->setHint(Ljava/lang/CharSequence;)V
Right under that is:

Code:
    const/4 v8, 0x0

    const/4 v9, 0x0

    const/4 v10, 0x0

    invoke-static {v8, v9, v10}, Landroid/graphics/Color;->rgb(III)I

    move-result v8

    invoke-static {v8}, Landroid/content/res/ColorStateList;->valueOf(I)Landroid/content/res/ColorStateList;
The above code controls the text coloring on the Text Box. You have two options:

You can change the v8, v9, v10 which is the RGB value (0x0) is Black in this case and change them to -0x1 for each one to make text color white.

The second option you can do if you want a special color without having to figure out RGB color coding is to add:

const v8, smali colorcode (for example -0xCC9934(DarkHorse Blue)) below move-result v8.. like so...

invoke-static {v8, v9, v10}, Landroid/graphics/Color;->rgb(III)I

Code:
    move-result v8

    const v8, -0xCC9934

    invoke-static {v8}, Landroid/content/res/ColorStateList;->valueOf(I)Landroid/content/res/ColorStateList;
Okay the next three items are much easier:

Right under the code for Text Coloring is the rest of the Inversion and other Changes

Code:
 
    invoke-virtual {v1, v8}, Landroid/inputmethodservice/ExtractEditText;->setTextColor(Landroid/content/res/ColorStateList;)V

    const/high16 v8, -0x100 # Cusor Color

    invoke-virtual {v1, v8}, Landroid/inputmethodservice/ExtractEditText;->setCursorColor(I)V

    .line 3261
    const/4 v8, -0x1 #Background Color

    invoke-virtual {v1, v8}, Landroid/inputmethodservice/ExtractEditText;->setBackgroundColor(I)V

    .line 3265
    const v8, -0x86350e #HighLight Cusor Color

    invoke-virtual {v1, v8}, Landroid/inputmethodservice/ExtractEditText;->setHighlightColor(I)V
Code Changes: An Example of my changes

Code:
    invoke-virtual {v1, v8}, Landroid/inputmethodservice/ExtractEditText;->setTextColor(Landroid/content/res/ColorStateList;)V

    const v8, -0x100 #Cusor Color(Yellow)

    invoke-virtual {v1, v8}, Landroid/inputmethodservice/ExtractEditText;->setCursorColor(I)V

    const v8, -0x1000000 #BackGround(Black)

    invoke-virtual {v1, v8}, Landroid/inputmethodservice/ExtractEditText;->setBackgroundColor(I)V

    const v8, -0xCC9934 #HighLight Cusor Color.(DarkHorse Blue)

    invoke-virtual {v1, v8}, Landroid/inputmethodservice/ExtractEditText;->setHighlightColor(I)V
Okay Save that. One more Item that needs to be done complete the Inversion!!!

framework/res/layout/input_method_extract_view.xml

Line 5 needs to be changed to complete the inversion(makes the black appear around the Send button)

Code:
    <FrameLayout android:id="@id/inputExtractAccessories" android:background="#ff000000" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingStart="8.0dip" android:paddingEnd="8.0dip">
        <android.inputmethodservice.ExtractButton android:layout_gravity="center" android:id="@id/inputExtractAction" android:layout_width="wrap_content" android:layout_height="wrap_content" />
        <android.inputmethodservice.ExtractButton android:layout_gravity="center" android:id="@id/inputExtractEditButton" android:visibility="invisible" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/extract_edit_menu_button" />
    </FrameLayout>
Save and Compile framework.jar and framework-res.apk..

Score!!!!
Attached Thumbnails
Click image for larger version

Name:	FullScreenInvert.png
Views:	351
Size:	134.2 KB
ID:	2723349  


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 3 Users Say Thank You to Gunthermic For This Useful Post: [ Click to Expand ]
 
kdizzleh85
Old
#2  
kdizzleh85's Avatar
Senior Member
Thanks Meter 640
Posts: 1,123
Join Date: Jun 2012
Location: Seattle
Thanks again for this. Works perfectly
https://www.paypal.com/cgi-bin/websc...if%3aNonHosted
TeamNocturnal____TeamNocturnal____TeamNocturnal___ _TeamNocturnal____TeamNocturnal____TeamNocturnal__ __TeamNocturnal___TeamNocturnal____TeamNocturnal
 
cbucz24
Old
#3  
cbucz24's Avatar
Recognized Themer
Thanks Meter 2,229
Posts: 2,257
Join Date: Jan 2011
Location: Central Florida

 
DONATE TO ME
Looks interesting @Gunthermic.

Curious question though, isn't it easier to just change the xml file and png images in the SamsungIME.apk?

Or am I missing what else this is doing?

Sent from my SM-G900T using Tapatalk 2
If I helped you in any way please click the THANKS! button below.
Even if you just want to click it for fun, go ahead, have fun.

 
Gunthermic
Old
#4  
Gunthermic's Avatar
Recognized Contributor / Themer - OP
Thanks Meter 8,554
Posts: 3,047
Join Date: Mar 2011

 
DONATE TO ME
Quote:
Originally Posted by cbucz24 View Post
Looks interesting @Gunthermic.

Curious question though, isn't it easier to just change the xml file and png images in the SamsungIME.apk?

Or am I missing what else this is doing?

Sent from my SM-G900T using Tapatalk 2
Sure. Tell me what u changed in samsungime that gets this same thing. I will gladly take thread down if there is a better way... Never found one.

If ya dont know and just asking. Then I say from my knowledge samsungime woild pull from framework jar file..

Sent from my SCH-I545 using Xparent BlueTapatalk 2


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
 
cbucz24
Old
#5  
cbucz24's Avatar
Recognized Themer
Thanks Meter 2,229
Posts: 2,257
Join Date: Jan 2011
Location: Central Florida

 
DONATE TO ME
Quote:
Originally Posted by Gunthermic View Post
Sure. Tell me what u changed in samsungime that gets this same thing. I will gladly take thread down if there is a better way... Never found one.

If ya dont know and just asking. Then I say from my knowledge samsungime woild pull from framework jar file..

Sent from my SCH-I545 using Xparent BlueTapatalk 2
OK well, before I get too far into things. Where does this change take effect in the system?

I edited the SamsungIME.apk to change things there. And i edited individual apks and changed things there too.

Here I changed the text colors to everything except the suggestion text.
Click image for larger version

Name:	uploadfromtaptalk1399144835277.jpg
Views:	162
Size:	120.2 KB
ID:	2723843

Link up a pic where the text is changed so I can see if I changed it in the same place with an xml if ya don't mind.

An I hope you didn't take offense to my question. We've talked before, I've used your work and you definitely do a great job!
I was just curious about what this exactly did, and if I could help you then yay me for helping someone as good as you

Sent from my SM-G900T using Tapatalk 2
If I helped you in any way please click the THANKS! button below.
Even if you just want to click it for fun, go ahead, have fun.

 
Gunthermic
Old
#6  
Gunthermic's Avatar
Recognized Contributor / Themer - OP
Thanks Meter 8,554
Posts: 3,047
Join Date: Mar 2011

 
DONATE TO ME
Quote:
Originally Posted by cbucz24 View Post
OK well, before I get too far into things. Where does this change take effect in the system?

I edited the SamsungIME.apk to change things there. And i edited individual apks and changed things there too.

Here I changed the text colors to everything except the suggestion text.
Attachment 2723843

Link up a pic where the text is changed so I can see if I changed it in the same place with an xml if ya don't mind.

An I hope you didn't take offense to my question. We've talked before, I've used your work and you definitely do a great job!
I was just curious about what this exactly did, and if I could help you then yay me for helping someone as good as you

Sent from my SM-G900T using Tapatalk 2
Pix was posted in OP sir.

This mod is for landscape and is the text box. Not keyboard layout.

No, no offense taken.. yes we have talked before kind sir

Sent from my SCH-I545 using Xparent BlueTapatalk 2


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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes