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

Search This thread

Gunthermic

Retired Forum Moderator
Mar 19, 2011
3,534
12,584
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\InputMethodService.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

    [COLOR="Blue"]const v8, -0xCC9934[/COLOR]

    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

    [COLOR="Blue"]const v8, -0x100 [/COLOR]#Cusor Color(Yellow)

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

    [COLOR="Blue"]const v8, -0x1000000 [/COLOR]#BackGround(Black)

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

    [COLOR="Blue"]const v8, -0xCC9934[/COLOR] #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" [COLOR="Blue"]android:background="#ff000000"[/COLOR] 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!!!!
 

Attachments

  • FullScreenInvert.png
    FullScreenInvert.png
    134.2 KB · Views: 498
Last edited:

cbucz24

Senior Member
Jan 31, 2011
2,757
2,897
Central Florida
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
 

Gunthermic

Retired Forum Moderator
Mar 19, 2011
3,534
12,584
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
 

cbucz24

Senior Member
Jan 31, 2011
2,757
2,897
Central Florida
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.
uploadfromtaptalk1399144835277.jpg

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
 

Gunthermic

Retired Forum Moderator
Mar 19, 2011
3,534
12,584
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.
View 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
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    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\InputMethodService.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
    
        [COLOR="Blue"]const v8, -0xCC9934[/COLOR]
    
        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
    
        [COLOR="Blue"]const v8, -0x100 [/COLOR]#Cusor Color(Yellow)
    
        invoke-virtual {v1, v8}, Landroid/inputmethodservice/ExtractEditText;->setCursorColor(I)V
    
        [COLOR="Blue"]const v8, -0x1000000 [/COLOR]#BackGround(Black)
    
        invoke-virtual {v1, v8}, Landroid/inputmethodservice/ExtractEditText;->setBackgroundColor(I)V
    
        [COLOR="Blue"]const v8, -0xCC9934[/COLOR] #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" [COLOR="Blue"]android:background="#ff000000"[/COLOR] 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!!!!