Skip to content

Commit

Permalink
fola//wip
Browse files Browse the repository at this point in the history
  • Loading branch information
maifeeulasad committed Feb 8, 2021
1 parent b18e5c0 commit 412314d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions app/src/main/java/com/mua/unmukto/UnmuktoKeyboardService.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,19 @@ public class UnmuktoKeyboardService
private final String SHORO_BORNO_STRING = " অ আ ই ঈ উ ঊ ঋ এ ঐ ও ঔ";
private final String KAR_STRING = " া ি ী ু ূ ৃ ে ৈ ো ৌ";
private final String BENJON_BORNO_STRING = "কখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহড়ঢ়য়ৎংঃঁ";
private final String FOLA_STRING = " ্";

private final int SHONGKHA_LOWER_BOUND = 130;
private final int SHOROBORNO_LOWER_BOUND = 140;
private final int KAR_LOWER_BOUND = 160;
private final int BENJONBORNO_LOWER_BOUND = 170;
private final int FOLA_LOWER_BOUND = 210;

private final int SHONGKHA_UPPER_BOUND = 139;
private final int SHOROBORNO_UPPER_BOUND = 151;
private final int KAR_UPPER_BOUND = 169;
private final int BENJONBORNO_UPPER_BOUND = 208;
private final int FOLA_UPPER_BOUND = 210;

private final int SPECIAL_CHAR_COMMA = -300;
private final int SPECIAL_CHAR_DARI = -301;
Expand Down Expand Up @@ -85,6 +88,9 @@ public void onPress(int primaryCode) {
} else if (primaryCode >= BENJONBORNO_LOWER_BOUND && primaryCode <= BENJONBORNO_UPPER_BOUND) {
char benjonBorno = BENJON_BORNO_STRING.charAt(primaryCode - BENJONBORNO_LOWER_BOUND);
ic.commitText(String.valueOf(benjonBorno), 1);
}else if (primaryCode >= FOLA_LOWER_BOUND && primaryCode <= FOLA_UPPER_BOUND) {
char fola = FOLA_STRING.charAt((primaryCode - FOLA_LOWER_BOUND) * 2 +1);
ic.commitText(String.valueOf(fola), 1);
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/xml/kbd_bn.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<Key android:codes="-189" android:keyOutputText='' android:keyLabel=""/>
<Key android:codes="-194" android:keyOutputText='' android:keyLabel=""/>
<Key android:codes="-165" android:keyOutputText='' android:keyLabel=""/>
<Key android:codes="-123" android:keyOutputText='' android:keyLabel="" android:keyEdgeFlags="right"/>
<Key android:codes="-210" android:keyOutputText='' android:keyLabel="" android:keyEdgeFlags="right"/>
</Row>


Expand Down

0 comments on commit 412314d

Please sign in to comment.