...
This commit is contained in:
parent
aa6fa8a79e
commit
e8ed60f300
Binary file not shown.
@ -1,24 +0,0 @@
|
|||||||
package com.mime.dualscreenview
|
|
||||||
|
|
||||||
import androidx.test.platform.app.InstrumentationRegistry
|
|
||||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
|
||||||
|
|
||||||
import org.junit.Test
|
|
||||||
import org.junit.runner.RunWith
|
|
||||||
|
|
||||||
import org.junit.Assert.*
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Instrumented test, which will execute on an Android device.
|
|
||||||
*
|
|
||||||
* See [testing documentation](http://d.android.com/tools/testing).
|
|
||||||
*/
|
|
||||||
@RunWith(AndroidJUnit4::class)
|
|
||||||
class ExampleInstrumentedTest {
|
|
||||||
@Test
|
|
||||||
fun useAppContext() {
|
|
||||||
// Context of the app under test.
|
|
||||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
|
||||||
assertEquals("com.mime.dualscreenview", appContext.packageName)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -14,6 +14,7 @@
|
|||||||
android:usesCleartextTraffic="true"
|
android:usesCleartextTraffic="true"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
|
android:largeHeap="true"
|
||||||
android:theme="@style/Theme.DualScreenView"
|
android:theme="@style/Theme.DualScreenView"
|
||||||
tools:targetApi="31" >
|
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_DOWN
|
||||||
import android.view.KeyEvent.KEYCODE_VOLUME_MUTE
|
import android.view.KeyEvent.KEYCODE_VOLUME_MUTE
|
||||||
import android.view.KeyEvent.KEYCODE_VOLUME_UP
|
import android.view.KeyEvent.KEYCODE_VOLUME_UP
|
||||||
|
import android.view.MotionEvent
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import com.mime.dualscreenview.common.Blog
|
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 {
|
override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
|
||||||
Blog.LOGD(log = "keyCode : ${keyCode}, event : ${event}")
|
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 07",arrayOf<String>("#F8BBD0", "#263238")),
|
||||||
Pair("color set 08",arrayOf<String>("#E6EE9C", "#455A64")),
|
Pair("color set 08",arrayOf<String>("#E6EE9C", "#455A64")),
|
||||||
Pair("color set 09",arrayOf<String>("#CFD8DC", "#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>>(
|
val typesfacez : PairArray<Int> = arrayOf<Pair<String,Int>>(
|
||||||
Pair("정선 아리랑 혼", R.font.jsarirang_hon),
|
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.kcc_sonkeechung),
|
||||||
Pair("교보 손글씨", R.font.kyobo_handwriting_2021sjy),
|
Pair("교보 손글씨", R.font.kyobo_handwriting_2021sjy),
|
||||||
Pair("태백 은하수", R.font.taebaek_milkyway),
|
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")
|
@JvmName("getIndexAny")
|
||||||
|
|||||||
BIN
app/src/main/res/font/cafe24oneprettynight.ttf
Normal file
BIN
app/src/main/res/font/cafe24oneprettynight.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/dovemayo.otf
Normal file
BIN
app/src/main/res/font/dovemayo.otf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/ebs_r.ttf
Normal file
BIN
app/src/main/res/font/ebs_r.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/gabia_solmee.ttf
Normal file
BIN
app/src/main/res/font/gabia_solmee.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/godomaum.ttf
Normal file
BIN
app/src/main/res/font/godomaum.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/kcc_kimhoon.ttf
Normal file
BIN
app/src/main/res/font/kcc_kimhoon.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/kccahnjunggeun.ttf
Normal file
BIN
app/src/main/res/font/kccahnjunggeun.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/kotra_bold.ttf
Normal file
BIN
app/src/main/res/font/kotra_bold.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/kotra_songeulssi.ttf
Normal file
BIN
app/src/main/res/font/kotra_songeulssi.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/mapoagape.ttf
Normal file
BIN
app/src/main/res/font/mapoagape.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/mapobackpacking.ttf
Normal file
BIN
app/src/main/res/font/mapobackpacking.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/mapodacapo.ttf
Normal file
BIN
app/src/main/res/font/mapodacapo.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/mapodpp.ttf
Normal file
BIN
app/src/main/res/font/mapodpp.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/mapodpp_2.ttf
Normal file
BIN
app/src/main/res/font/mapodpp_2.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/mapoflowerisland.ttf
Normal file
BIN
app/src/main/res/font/mapoflowerisland.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/mapogoldenpier.ttf
Normal file
BIN
app/src/main/res/font/mapogoldenpier.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/mapomaponaru.ttf
Normal file
BIN
app/src/main/res/font/mapomaponaru.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/mapopeacefull.ttf
Normal file
BIN
app/src/main/res/font/mapopeacefull.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/nnsgc_brhp.ttf
Normal file
BIN
app/src/main/res/font/nnsgc_brhp.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/nnsgc_gd_an_gd.ttf
Normal file
BIN
app/src/main/res/font/nnsgc_gd_an_gd.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/nnsgc_md.ttf
Normal file
BIN
app/src/main/res/font/nnsgc_md.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/nnsgc_wsjidyp.ttf
Normal file
BIN
app/src/main/res/font/nnsgc_wsjidyp.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/nnsgc_yjc.ttf
Normal file
BIN
app/src/main/res/font/nnsgc_yjc.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/on_jsuhl.ttf
Normal file
BIN
app/src/main/res/font/on_jsuhl.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/on_jsuhr.ttf
Normal file
BIN
app/src/main/res/font/on_jsuhr.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/on_sbsjl.ttf
Normal file
BIN
app/src/main/res/font/on_sbsjl.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/on_sbsjr.ttf
Normal file
BIN
app/src/main/res/font/on_sbsjr.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/on_treeususimgul.ttf
Normal file
BIN
app/src/main/res/font/on_treeususimgul.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/on_treeususimgul_r.ttf
Normal file
BIN
app/src/main/res/font/on_treeususimgul_r.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/on_wibsr.ttf
Normal file
BIN
app/src/main/res/font/on_wibsr.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/on_wisbl.ttf
Normal file
BIN
app/src/main/res/font/on_wisbl.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/on_ychyuhl.ttf
Normal file
BIN
app/src/main/res/font/on_ychyuhl.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/on_ychyuhr.ttf
Normal file
BIN
app/src/main/res/font/on_ychyuhr.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/ssshinb7.ttf
Normal file
BIN
app/src/main/res/font/ssshinb7.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/taefont_tsthlml.ttf
Normal file
BIN
app/src/main/res/font/taefont_tsthlml.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/tvn_jguiyg_light.ttf
Normal file
BIN
app/src/main/res/font/tvn_jguiyg_light.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/tvn_jguiyg_medium.ttf
Normal file
BIN
app/src/main/res/font/tvn_jguiyg_medium.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/wandohoper.ttf
Normal file
BIN
app/src/main/res/font/wandohoper.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/ylee_mortal_heart_immortal_memory.ttf
Normal file
BIN
app/src/main/res/font/ylee_mortal_heart_immortal_memory.ttf
Normal file
Binary file not shown.
@ -1,17 +0,0 @@
|
|||||||
package com.mime.dualscreenview
|
|
||||||
|
|
||||||
import org.junit.Test
|
|
||||||
|
|
||||||
import org.junit.Assert.*
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Example local unit test, which will execute on the development machine (host).
|
|
||||||
*
|
|
||||||
* See [testing documentation](http://d.android.com/tools/testing).
|
|
||||||
*/
|
|
||||||
class ExampleUnitTest {
|
|
||||||
@Test
|
|
||||||
fun addition_isCorrect() {
|
|
||||||
assertEquals(4, 2 + 2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user