...
This commit is contained in:
parent
68c16339ea
commit
466a819800
@ -309,6 +309,15 @@ open class NeoRssActivity : CommonActivity() {
|
||||
return super.dispatchKeyShortcutEvent(event)
|
||||
}
|
||||
|
||||
override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
|
||||
Blog.LOGE("onKeyDown >> $keyCode $event")
|
||||
return super.onKeyDown(keyCode, event)
|
||||
}
|
||||
|
||||
override fun onKeyUp(keyCode: Int, event: KeyEvent?): Boolean {
|
||||
Blog.LOGE("onKeyUp >> $keyCode $event")
|
||||
return super.onKeyUp(keyCode, event)
|
||||
}
|
||||
override fun dispatchGenericMotionEvent(ev: MotionEvent?): Boolean {
|
||||
if ("Virtual".equals(ev?.device?.name)) return true
|
||||
Blog.LOGE("keyEvent >>>>> dispatchGenericMotionEvent ${ev?.device?.name ?: ""}: ${ev} ")
|
||||
|
||||
@ -340,6 +340,27 @@ class TokiFragment : RemoteGestureFragment(), PagedTextViewInterface,KeyEventHan
|
||||
if (isUp) actionPrevEvent()
|
||||
true
|
||||
}
|
||||
KeyEvent.KEYCODE_DPAD_DOWN -> {
|
||||
if (isUp) onSwipeDown(2)
|
||||
true
|
||||
}
|
||||
KeyEvent.KEYCODE_DPAD_UP -> {
|
||||
if (isUp) {
|
||||
val intent = Intent(Intent.ACTION_MAIN)
|
||||
intent.addCategory(Intent.CATEGORY_HOME)
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
startActivity(intent)
|
||||
}
|
||||
true
|
||||
}
|
||||
KeyEvent.KEYCODE_DPAD_LEFT -> {
|
||||
if (isUp) actionPrevEvent()
|
||||
true
|
||||
}
|
||||
KeyEvent.KEYCODE_DPAD_RIGHT -> {
|
||||
if (isUp) actionNextEvent()
|
||||
true
|
||||
}
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:hint="앱 검색"
|
||||
android:textColorHint="@color/white"
|
||||
android:imeOptions="actionSearch"
|
||||
android:singleLine="true"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user