...
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
android:usesCleartextTraffic="true"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:largeHeap="true"
|
||||
android:theme="@style/Theme.DualScreenView"
|
||||
tools:targetApi="31" >
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import android.view.KeyEvent.KEYCODE_MEDIA_REWIND
|
||||
import android.view.KeyEvent.KEYCODE_VOLUME_DOWN
|
||||
import android.view.KeyEvent.KEYCODE_VOLUME_MUTE
|
||||
import android.view.KeyEvent.KEYCODE_VOLUME_UP
|
||||
import android.view.MotionEvent
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.mime.dualscreenview.common.Blog
|
||||
@@ -57,6 +58,54 @@ open class Base : AppCompatActivity() {
|
||||
}
|
||||
|
||||
|
||||
var actionButtonPressX = 0f
|
||||
var actionButtonPressY = 0f
|
||||
override fun dispatchGenericMotionEvent(ev: MotionEvent?): Boolean {
|
||||
if (ev?.device?.name?.contains("BLE-M3") == true) {
|
||||
Blog.LOGE("keyEvent >>>>> dispatchGenericMotionEvent ${ev}")
|
||||
ev?.action?.let { action ->
|
||||
when(action) {
|
||||
MotionEvent.ACTION_HOVER_ENTER -> {
|
||||
return false
|
||||
}
|
||||
MotionEvent.ACTION_HOVER_MOVE ->{return false}
|
||||
MotionEvent.ACTION_BUTTON_PRESS ->{
|
||||
if (actionButtonPressX * actionButtonPressY == 0f) {
|
||||
actionButtonPressX = ev.x ?: 0f
|
||||
actionButtonPressY = ev.y ?: 0f
|
||||
}
|
||||
return true
|
||||
}
|
||||
MotionEvent.ACTION_BUTTON_RELEASE ->{
|
||||
if (actionButtonPressY == ev.y) {
|
||||
if (actionButtonPressX.minus(ev.x ?: 0f) > 0f) {
|
||||
Blog.LOGE("Arrow Right Click")
|
||||
onKeyClick(KeyEvent.KEYCODE_VOLUME_DOWN)
|
||||
} else {
|
||||
Blog.LOGE("Arrow Left Click")
|
||||
onKeyClick(KeyEvent.KEYCODE_VOLUME_UP)
|
||||
}
|
||||
} else {
|
||||
if (actionButtonPressY.minus(ev.y ?: 0f) > 0f) {
|
||||
Blog.LOGE("Arrow Down Click")
|
||||
} else {
|
||||
Blog.LOGE("Arrow Up Click")
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
MotionEvent.ACTION_HOVER_EXIT ->{
|
||||
actionButtonPressX = 0f
|
||||
actionButtonPressY = 0f
|
||||
return false
|
||||
}
|
||||
else -> {return false}
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.dispatchGenericMotionEvent(ev)
|
||||
}
|
||||
|
||||
|
||||
override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
|
||||
Blog.LOGD(log = "keyCode : ${keyCode}, event : ${event}")
|
||||
|
||||
@@ -13,7 +13,21 @@ val colorz : PairArray<Array<String>> = arrayOf<Pair<String,Array<String>>>(
|
||||
Pair("color set 07",arrayOf<String>("#F8BBD0", "#263238")),
|
||||
Pair("color set 08",arrayOf<String>("#E6EE9C", "#455A64")),
|
||||
Pair("color set 09",arrayOf<String>("#CFD8DC", "#455A64")),
|
||||
Pair("color set 10",arrayOf<String>("#FFF59D", "#37474F"))
|
||||
Pair("color set 10",arrayOf<String>("#FFF59D", "#37474F")),
|
||||
Pair("color set 21",arrayOf<String>("#263238","#E1F5FE")),
|
||||
Pair("color set 22",arrayOf<String>("#37474F","#F0F4C3")),
|
||||
Pair("color set 23",arrayOf<String>("#455A64","#ECEFF1")),
|
||||
Pair("color set 24",arrayOf<String>("#263238","#E0F7FA")),
|
||||
Pair("color set 25",arrayOf<String>("#263238","#F5F5F5")),
|
||||
Pair("color set 26",arrayOf<String>("#263238","#ECEFF1")),
|
||||
Pair("color set 27",arrayOf<String>("#263238","#F8BBD0")),
|
||||
Pair("color set 28",arrayOf<String>("#455A64","#E6EE9C")),
|
||||
Pair("color set 29",arrayOf<String>("#455A64","#CFD8DC")),
|
||||
Pair("color set 30",arrayOf<String>("#37474F","#FFF59D")),
|
||||
Pair("color set 31",arrayOf<String>("#FFFFFF","#1C1B1B")),
|
||||
Pair("color set 32",arrayOf<String>("#272727","#FFFFFF")),
|
||||
Pair("color set 33",arrayOf<String>("#1C1B1B","#FFFFFF")),
|
||||
Pair("color set 34",arrayOf<String>("#FFFFFF","#272727"))
|
||||
)
|
||||
val typesfacez : PairArray<Int> = arrayOf<Pair<String,Int>>(
|
||||
Pair("정선 아리랑 혼", R.font.jsarirang_hon),
|
||||
@@ -22,6 +36,37 @@ val typesfacez : PairArray<Int> = arrayOf<Pair<String,Int>>(
|
||||
Pair("손기정체", R.font.kcc_sonkeechung),
|
||||
Pair("교보 손글씨", R.font.kyobo_handwriting_2021sjy),
|
||||
Pair("태백 은하수", R.font.taebaek_milkyway),
|
||||
Pair("taebaek_milkyway",R.font.taebaek_milkyway),
|
||||
Pair("kccahnjunggeun",R.font.kccahnjunggeun),
|
||||
Pair("kotra_songeulssi",R.font.kotra_songeulssi),
|
||||
Pair("kotra_bold",R.font.kotra_bold),
|
||||
Pair("cafe24oneprettynight",R.font.cafe24oneprettynight),
|
||||
Pair("nnsgc_wsjidyp",R.font.nnsgc_wsjidyp),
|
||||
Pair("nnsgc_yjc",R.font.nnsgc_yjc),
|
||||
Pair("nnsgc_brhp",R.font.nnsgc_brhp),
|
||||
Pair("nnsgc_md",R.font.nnsgc_md),
|
||||
Pair("nnsgc_gd_an_gd",R.font.nnsgc_gd_an_gd),
|
||||
Pair("dovemayo",R.font.dovemayo),
|
||||
Pair("gabia_solmee",R.font.gabia_solmee),
|
||||
Pair("ylee_mortal_heart_immortal_memory",R.font.ylee_mortal_heart_immortal_memory),
|
||||
Pair("kcc_kimhoon",R.font.kcc_kimhoon),
|
||||
Pair("taefont_tsthlml",R.font.taefont_tsthlml),
|
||||
Pair("ssshinb7",R.font.ssshinb7),
|
||||
Pair("godomaum",R.font.godomaum),
|
||||
Pair("tvn_jguiyg_medium",R.font.tvn_jguiyg_medium),
|
||||
Pair("tvn_jguiyg_light",R.font.tvn_jguiyg_light),
|
||||
Pair("on_jsuhr",R.font.on_jsuhr),
|
||||
Pair("on_jsuhl",R.font.on_jsuhl),
|
||||
Pair("on_ychyuhr",R.font.on_ychyuhr),
|
||||
Pair("on_ychyuhl",R.font.on_ychyuhl),
|
||||
Pair("on_treeususimgul_r",R.font.on_treeususimgul_r),
|
||||
Pair("on_treeususimgul",R.font.on_treeususimgul),
|
||||
Pair("on_wibsr",R.font.on_wibsr),
|
||||
Pair("on_wisbl",R.font.on_wisbl),
|
||||
Pair("on_sbsjl",R.font.on_sbsjl),
|
||||
Pair("on_sbsjr",R.font.on_sbsjr),
|
||||
Pair("wandohoper",R.font.wandohoper),
|
||||
Pair("ebs_r",R.font.ebs_r),
|
||||
)
|
||||
|
||||
@JvmName("getIndexAny")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user