Skip to content

Commit

Permalink
Update Khmer translation
Browse files Browse the repository at this point in the history
  • Loading branch information
Sreang Rathanak committed Dec 16, 2023
1 parent 40a016e commit ba39741
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apply plugin: 'kotlin-kapt'
apply plugin: 'realm-android'

android {
compileSdkVersion 30
compileSdkVersion 34
buildToolsVersion '30.0.2'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -20,7 +20,7 @@ android {
defaultConfig {
applicationId "com.rathanak.khmerroman"
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 34
versionCode 2
versionName '2.0'

Expand Down
11 changes: 8 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,25 @@
<activity
android:name=".view.ProfileSettingsActivity"
android:screenOrientation="fullSensor"
android:label="@string/title_activity_profile_settings"></activity>
android:label="@string/title_activity_profile_settings"
android:exported="true"></activity>
<activity android:name=".view.CustomMapping"
android:screenOrientation="fullSensor"
android:label="@string/title_activity_custom_mapping"/>
android:label="@string/title_activity_custom_mapping"
android:exported="true"/>
<activity android:name=".view.RomanMapping"
android:screenOrientation="fullSensor"
android:label="@string/title_activity_roman_mapping"/>
android:label="@string/title_activity_roman_mapping"
android:exported="true"/>
<activity
android:exported="true"
android:name=".view.About"
android:screenOrientation="fullSensor"
android:theme="@style/Theme.AppCompat.NoActionBar" />
<activity
android:name=".view.MainActivity"
android:screenOrientation="fullSensor"
android:exported="true"
android:theme="@style/Theme.AppCompat.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,16 +205,15 @@ class CustomInputMethodView @JvmOverloads constructor(
context,
object : GestureDetector.SimpleOnGestureListener() {
override fun onFling(
e1: MotionEvent,
e1: MotionEvent?,
e2: MotionEvent,
velocityX: Float,
velocityY: Float
): Boolean {
var isChangeLanguageSwipe = 0x000
var direction = 0
var swipeThreshold = width / 2

val e1PointerId = e1.getPointerId(e1.actionIndex)
val e1PointerId = e1?.getPointerId(e1.actionIndex)
val e2PointerId = e2.getPointerId(e2.actionIndex)
if (e1PointerId != e2PointerId) return false
// Check if the swipe is within the area of the language switch key.
Expand All @@ -226,6 +225,7 @@ class CustomInputMethodView @JvmOverloads constructor(
isChangeLanguageSwipe = 0x001 // 0x001 for being inside the key view.
swipeThreshold = e1Key.width / 4
}

var result = false
val distanceY = e2.y - e1.y
val distanceX = e2.x - e1.x
Expand Down Expand Up @@ -456,8 +456,8 @@ class CustomInputMethodView @JvmOverloads constructor(
val keyRight = key.right.toFloat()
val keyTop = key.top.toFloat()
val keyBottom = key.bottom.toFloat()
if (x - left in keyLeft..keyRight &&
y - top in keyTop..keyBottom) {
if (x - layoutLeft in keyLeft..keyRight &&
y - layoutTop in keyTop..keyBottom) {
return key
}
}
Expand Down

0 comments on commit ba39741

Please sign in to comment.