5,599,677 Members 45,794 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
josephpatrick
Old
(Last edited by josephpatrick; 19th January 2014 at 11:04 AM.)
#1  
Senior Member - OP
Thanks Meter 52
Posts: 207
Join Date: Jan 2012
Default [How To] Port Note keyboard to S2 [dedicated number row]

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" androidopupCharacters="@string/default_umlaut_q" android:keyEdgeFlags="left" android:keyLabel="q" />
<Key android:codes="119" androidopupCharacters="@string/default_umlaut_w" android:keyLabel="w" />
<Key android:codes="101" androidopupCharacters="@string/default_umlaut_e" android:keyLabel="e" />
<Key android:codes="114" androidopupCharacters="@string/default_umlaut_r" android:keyLabel="r" />
<Key android:codes="116" androidopupCharacters="@string/default_umlaut_t" android:keyLabel="t" />
<Key android:codes="121" androidopupCharacters="@string/default_umlaut_y" android:keyLabel="y" />
<Key android:codes="117" androidopupCharacters="@string/default_umlaut_u" android:keyLabel="u" />
<Key android:codes="105" androidopupCharacters="@string/default_umlaut_i" android:keyLabel="i" />
<Key android:codes="111" androidopupCharacters="@string/default_umlaut_o" android:keyLabel="o" />
<Key android:codes="112" androidopupCharacters="@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=user...%81&uid=191755
Attached Files
File Type: zip qwerty.zip - [Click for QR Code] (3.1 KB, 77 views)
The Following 4 Users Say Thank You to josephpatrick For This Useful Post: [ Click to Expand ]
 
Vivek_Neel
Old
#2  
Vivek_Neel's Avatar
Recognized Contributor
Thanks Meter 16291
Posts: 6,027
Join Date: Dec 2012
Location: chennai

 
DONATE TO ME
Quote:
Originally Posted by josephpatrick View Post
 
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

Quote:
Originally Posted by josephpatrick View Post
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=user...%81&uid=191755
Should not we recompile the apk at last?


BTW nice guide


Sent from my GT-I9100 using Tapatalk 2
The Following User Says Thank You to Vivek_Neel For This Useful Post: [ Click to Expand ]
 
josephpatrick
Old
#3  
Senior Member - OP
Thanks Meter 52
Posts: 207
Join Date: Jan 2012
Quote:
Originally Posted by corruptionfreeindia View Post
[/hide]


Should not we recompile the apk at last?


BTW nice guide


Sent from my GT-I9100 using Tapatalk 2
Corrected, thanks
The Following User Says Thank You to josephpatrick For This Useful Post: [ Click to Expand ]
 
Christian Nothing
Old
#4  
Christian Nothing's Avatar
Senior Member
Thanks Meter 5247
Posts: 5,077
Join Date: Jan 2012
Location: ⒸⓁⒶⓈⓈⒾⒻⒾⒺⒹ

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

Sent from my PMP5880D using Tapatalk Pro v4
The Following User Says Thank You to Christian Nothing For This Useful Post: [ Click to Expand ]
 
mma173
Old
#5  
Junior Member
Thanks Meter 0
Posts: 10
Join Date: Sep 2007
Default 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'
 
josephpatrick
Old
#6  
Senior Member - OP
Thanks Meter 52
Posts: 207
Join Date: Jan 2012
Quote:
Originally Posted by mma173 View Post
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'
Does not seem possible because of the Samsung framework
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes