[How To] Port Note keyboard to S2 [dedicated number row]

Search This thread

josephpatrick

Senior Member
Jan 24, 2012
1,213
237
Bangalore
Christian ported this keyboard to S2 but this is a how to do it yourself, prepared it from scratch after a lot of research

1) Extract SamsungIME.apk from the ROM that you prefer that has the default S2 Samsung keyboard
2) decompile the apk
3) in the extracted/decompiled folder, browse to res\xml-sw320dp-hdpi\properties.xml
4) search for the following line and change the value to "true" as seen below

<Property key="USE_ADDTO_NUMBER_KEY_FIRST_LINE" value="true" type="bool" />

5) add the following line at the bottom of the same file

<Property key="NOTE_KEYPAD_TYPE" value="true" type="bool" />

6) next browse to /res/xml-sw320dp-hdpi/qwerty_en.xml and add the following code at the top. Blue color code is what was added to the top to add the numeric row. Modified file attached.

<Row android:keyHeight="0.0px" android:horizontalGap="0.0px" android:verticalGap="@dimen/qwerty_first_line_vertical_gap">
<Key android:keyWidth="100.0%p" android:codes="-257" android:keyLabel="StrEmpty" />
</Row>
<Row android:keyHeight="@dimen/qwerty_number_key_height" android:rowEdgeFlags="top">
<Key android:horizontalGap="@dimen/qwerty_first_col_horizontal_gap" android:codes="0x31" android:keyEdgeFlags="left" android:keyLabel="1" />
<Key android:codes="0x32" android:keyLabel="2" />
<Key android:codes="0x33" android:keyLabel="3" />
<Key android:codes="0x34" android:keyLabel="4" />
<Key android:codes="0x35" android:keyLabel="5" />
<Key android:codes="0x36" android:keyLabel="6" />
<Key android:codes="0x37" android:keyLabel="7" />
<Key android:codes="0x38" android:keyLabel="8" />
<Key android:codes="0x39" android:keyLabel="9" />
<Key android:codes="0x30" android:keyEdgeFlags="right" android:keyLabel="0" />
</Row>

<Row>
<Key android:horizontalGap="@dimen/qwerty_first_col_horizontal_gap" android:codes="113" android:popupCharacters="@string/default_umlaut_q" android:keyEdgeFlags="left" android:keyLabel="q" />
<Key android:codes="119" android:popupCharacters="@string/default_umlaut_w" android:keyLabel="w" />
<Key android:codes="101" android:popupCharacters="@string/default_umlaut_e" android:keyLabel="e" />
<Key android:codes="114" android:popupCharacters="@string/default_umlaut_r" android:keyLabel="r" />
<Key android:codes="116" android:popupCharacters="@string/default_umlaut_t" android:keyLabel="t" />
<Key android:codes="121" android:popupCharacters="@string/default_umlaut_y" android:keyLabel="y" />
<Key android:codes="117" android:popupCharacters="@string/default_umlaut_u" android:keyLabel="u" />
<Key android:codes="105" android:popupCharacters="@string/default_umlaut_i" android:keyLabel="i" />
<Key android:codes="111" android:popupCharacters="@string/default_umlaut_o" android:keyLabel="o" />
<Key android:codes="112" android:popupCharacters="@string/default_umlaut_p" android:keyEdgeFlags="right" android:keyLabel="p" />
</Row>

7) most of the ported keyboards did not have 5 rows in the symbols page. I preferred to match 5 rows on the symbols page like the note keyboard. So, I had to make changes to qwerty_number_symbols.xml file. I remapped the keys and hence attached xml file to the post.

8) Finally I preferred to increase the height of the numeric keys and so I change "qwerty_number_key_height" in dimens.xml to 48 from default value of 31 or 32

I change it both under \res\values\dimes.xml and also \res\values-sw320dp-hdpi\dimes.xml

9) decompile back the apk and then replace the original file with the modified apk file in \preload...\app\

Note: these are the steps to be performed to English language keyboard. For other languages, you need to edit the corresponding qwerty_xx.xml and qwerty_number_symbols_xx.xml file. Thanks to Christian for highlighting this.

Hoping not to missed anything. Got ideas from Korean website.
http://www.matcl.com/?m=bbs&bid=usermoim&cat=팁&uid=191755
 

Attachments

  • qwerty.zip
    3.1 KB · Views: 266
Last edited:

Vivek_Neel

Inactive Recognized Contributor / Themer
Dec 23, 2012
10,372
23,696
31
Chennai
Christian ported this keyboard to S2 but this is a how to do it yourself, prepared it from scratch after a lot of research

1) Extract SamsungIME.apk from the ROM that you prefer that has the default S2 Samsung keyboard
2) decompile the apk
3) in the extracted/decompiled folder, browse to res\xml-sw320dp-hdpi\properties.xml
4) search for the following line and change the value to "true" as seen below



5) add the following line at the bottom of the same file



6) next browse to /res/xml-sw320dp-hdpi/qwerty_en.xml and add the following code at the top. Blue color code is what was added to the top to add the numeric row. Modified file attached.





























7) most of the ported keyboards did not have 5 rows in the symbols page. I preferred to match 5 rows on the symbols page like the note keyboard. So, I had to make changes to qwerty_number_symbols.xml file. I remapped the keys and hence attached xml file to the post.

8) Finally I preferred to increase the height of the numeric keys and so I change "qwerty_number_key_height" in dimens.xml to 48 from default value of 31 or 32

I change it both under \res\values\dimes.xml and also \res\values-sw320dp-hdpi\dimes.xml

9) decompile back the apk and then replace the original file with the modified apk file in \preload...\app\

Hoping not to missed anything. Got ideas from Korean website.
http://www.matcl.com/?m=bbs&bid=usermoim&cat=팁&uid=191755

Should not we recompile the apk at last?:D


BTW nice guide


Sent from my GT-I9100 using Tapatalk 2
 
  • Like
Reactions: Christian Nothing

mma173

Member
Sep 16, 2007
18
1
Touchwiz Independent

How to make it independent from Touchwiz or Samsung Firmware? In other words how to make it work on AOSP and other ROMs variations?
Thanks'
 

kmdangi

Senior Member
Jan 12, 2013
738
117
Pune, India
Thanks for very useful guide. I could edit the code and got number row working on my Samsung default keyboard on Galaxy S3 Korean variant. I was looking for this guide from many days. Thanks again bro.
One thing, there are no keys beneath the number rows, can you guide how to add these ? only number rows are seen :(
 

Attachments

  • Screenshot_2014-08-25-15-47-54.png
    Screenshot_2014-08-25-15-47-54.png
    109.3 KB · Views: 398
  • Screenshot_2014-08-25-15-48-54.png
    Screenshot_2014-08-25-15-48-54.png
    103.1 KB · Views: 348

josephpatrick

Senior Member
Jan 24, 2012
1,213
237
Bangalore
Thanks for very useful guide. I could edit the code and got number row working on my Samsung default keyboard on Galaxy S3 Korean variant. I was looking for this guide from many days. Thanks again bro.
One thing, there are no keys beneath the number rows, can you guide how to add these ? only number rows are seen :(

You might want to check "sip_key_bg_number.9.png" and "sip_key_bg_number_qwerty.9.png" under res\drawable-sw3**** folders. For landscape layout, you need to also make changes in folder "res\drawable-sw***-land***" folders
 
  • Like
Reactions: kmdangi

kmdangi

Senior Member
Jan 12, 2013
738
117
Pune, India
You might want to check "sip_key_bg_number.9.png" and "sip_key_bg_number_qwerty.9.png" under res\drawable-sw3**** folders. For landscape layout, you need to also make changes in folder "res\drawable-sw***-land***" folders

thanks josephpatrick,

I deleted <Property key="USE_ADDTO_NUMBER_KEY_FIRST_LINE" value="true" type="bool" /> from properties.xml and the problem was solved !!
:D
Can you help me, How to disable the secondary keylabels seen on the number buttons ?
 

Attachments

  • screenshot.png
    screenshot.png
    127.7 KB · Views: 148

josephpatrick

Senior Member
Jan 24, 2012
1,213
237
Bangalore
thanks josephpatrick,

I deleted <Property key="USE_ADDTO_NUMBER_KEY_FIRST_LINE" value="true" type="bool" /> from properties.xml and the problem was solved !!
:D
Can you help me, How to disable the secondary keylabels seen on the number buttons ?

Glad u figured it out. Normally the number row has a different background image/color.

For the symbol part, system/csc/feature.xml ==> remove following lines

<CscFeature_Sip_UseSymbolInCMKey>true</CscFeature_Sip_UseSymbolInCMKey>
<CscFeature_Sip_EnableSymbolInSecondary>de;en_US;en_GB</CscFeature_Sip_EnableSymbolInSecondary>

Use root explorer and edit the file
 

kmdangi

Senior Member
Jan 12, 2013
738
117
Pune, India
Glad u figured it out. Normally the number row has a different background image/color.

For the symbol part, system/csc/feature.xml ==> remove following lines

<CscFeature_Sip_UseSymbolInCMKey>true</CscFeature_Sip_UseSymbolInCMKey>
<CscFeature_Sip_EnableSymbolInSecondary>de;en_US;en_GB</CscFeature_Sip_EnableSymbolInSecondary>

Use root explorer and edit the file
==============
deleted above lines from feature.xml but the secondary labels on number keys are still present :(
Note : labels are seen only during alphabet view of keyboard, during symbol view it does not show up.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    Christian ported this keyboard to S2 but this is a how to do it yourself, prepared it from scratch after a lot of research

    1) Extract SamsungIME.apk from the ROM that you prefer that has the default S2 Samsung keyboard
    2) decompile the apk
    3) in the extracted/decompiled folder, browse to res\xml-sw320dp-hdpi\properties.xml
    4) search for the following line and change the value to "true" as seen below

    <Property key="USE_ADDTO_NUMBER_KEY_FIRST_LINE" value="true" type="bool" />

    5) add the following line at the bottom of the same file

    <Property key="NOTE_KEYPAD_TYPE" value="true" type="bool" />

    6) next browse to /res/xml-sw320dp-hdpi/qwerty_en.xml and add the following code at the top. Blue color code is what was added to the top to add the numeric row. Modified file attached.

    <Row android:keyHeight="0.0px" android:horizontalGap="0.0px" android:verticalGap="@dimen/qwerty_first_line_vertical_gap">
    <Key android:keyWidth="100.0%p" android:codes="-257" android:keyLabel="StrEmpty" />
    </Row>
    <Row android:keyHeight="@dimen/qwerty_number_key_height" android:rowEdgeFlags="top">
    <Key android:horizontalGap="@dimen/qwerty_first_col_horizontal_gap" android:codes="0x31" android:keyEdgeFlags="left" android:keyLabel="1" />
    <Key android:codes="0x32" android:keyLabel="2" />
    <Key android:codes="0x33" android:keyLabel="3" />
    <Key android:codes="0x34" android:keyLabel="4" />
    <Key android:codes="0x35" android:keyLabel="5" />
    <Key android:codes="0x36" android:keyLabel="6" />
    <Key android:codes="0x37" android:keyLabel="7" />
    <Key android:codes="0x38" android:keyLabel="8" />
    <Key android:codes="0x39" android:keyLabel="9" />
    <Key android:codes="0x30" android:keyEdgeFlags="right" android:keyLabel="0" />
    </Row>

    <Row>
    <Key android:horizontalGap="@dimen/qwerty_first_col_horizontal_gap" android:codes="113" android:popupCharacters="@string/default_umlaut_q" android:keyEdgeFlags="left" android:keyLabel="q" />
    <Key android:codes="119" android:popupCharacters="@string/default_umlaut_w" android:keyLabel="w" />
    <Key android:codes="101" android:popupCharacters="@string/default_umlaut_e" android:keyLabel="e" />
    <Key android:codes="114" android:popupCharacters="@string/default_umlaut_r" android:keyLabel="r" />
    <Key android:codes="116" android:popupCharacters="@string/default_umlaut_t" android:keyLabel="t" />
    <Key android:codes="121" android:popupCharacters="@string/default_umlaut_y" android:keyLabel="y" />
    <Key android:codes="117" android:popupCharacters="@string/default_umlaut_u" android:keyLabel="u" />
    <Key android:codes="105" android:popupCharacters="@string/default_umlaut_i" android:keyLabel="i" />
    <Key android:codes="111" android:popupCharacters="@string/default_umlaut_o" android:keyLabel="o" />
    <Key android:codes="112" android:popupCharacters="@string/default_umlaut_p" android:keyEdgeFlags="right" android:keyLabel="p" />
    </Row>

    7) most of the ported keyboards did not have 5 rows in the symbols page. I preferred to match 5 rows on the symbols page like the note keyboard. So, I had to make changes to qwerty_number_symbols.xml file. I remapped the keys and hence attached xml file to the post.

    8) Finally I preferred to increase the height of the numeric keys and so I change "qwerty_number_key_height" in dimens.xml to 48 from default value of 31 or 32

    I change it both under \res\values\dimes.xml and also \res\values-sw320dp-hdpi\dimes.xml

    9) decompile back the apk and then replace the original file with the modified apk file in \preload...\app\

    Note: these are the steps to be performed to English language keyboard. For other languages, you need to edit the corresponding qwerty_xx.xml and qwerty_number_symbols_xx.xml file. Thanks to Christian for highlighting this.

    Hoping not to missed anything. Got ideas from Korean website.
    http://www.matcl.com/?m=bbs&bid=usermoim&cat=팁&uid=191755
    1
    Christian ported this keyboard to S2 but this is a how to do it yourself, prepared it from scratch after a lot of research

    1) Extract SamsungIME.apk from the ROM that you prefer that has the default S2 Samsung keyboard
    2) decompile the apk
    3) in the extracted/decompiled folder, browse to res\xml-sw320dp-hdpi\properties.xml
    4) search for the following line and change the value to "true" as seen below



    5) add the following line at the bottom of the same file



    6) next browse to /res/xml-sw320dp-hdpi/qwerty_en.xml and add the following code at the top. Blue color code is what was added to the top to add the numeric row. Modified file attached.





























    7) most of the ported keyboards did not have 5 rows in the symbols page. I preferred to match 5 rows on the symbols page like the note keyboard. So, I had to make changes to qwerty_number_symbols.xml file. I remapped the keys and hence attached xml file to the post.

    8) Finally I preferred to increase the height of the numeric keys and so I change "qwerty_number_key_height" in dimens.xml to 48 from default value of 31 or 32

    I change it both under \res\values\dimes.xml and also \res\values-sw320dp-hdpi\dimes.xml

    9) decompile back the apk and then replace the original file with the modified apk file in \preload...\app\

    Hoping not to missed anything. Got ideas from Korean website.
    http://www.matcl.com/?m=bbs&bid=usermoim&cat=팁&uid=191755

    Should not we recompile the apk at last?:D


    BTW nice guide


    Sent from my GT-I9100 using Tapatalk 2
    1
    [/hide]


    Should not we recompile the apk at last?:D


    BTW nice guide


    Sent from my GT-I9100 using Tapatalk 2

    Corrected, thanks
    1
    Good job with the guide mate :)
    But don't forget to type that they need to edit all the remaining querty_xx.xml (xx is the abbreviated language) or to edit their favorite language ;)
    Good job once again , I was too lazy to start making a guide for the extra row with the numbers :eek:

    Sent from my PMP5880D using Tapatalk Pro v4
    1
    Thanks for very useful guide. I could edit the code and got number row working on my Samsung default keyboard on Galaxy S3 Korean variant. I was looking for this guide from many days. Thanks again bro.
    One thing, there are no keys beneath the number rows, can you guide how to add these ? only number rows are seen :(

    You might want to check "sip_key_bg_number.9.png" and "sip_key_bg_number_qwerty.9.png" under res\drawable-sw3**** folders. For landscape layout, you need to also make changes in folder "res\drawable-sw***-land***" folders