fix:三星Spen失效的问题,并添加上一章和下一章的操作选项 (#1583)
This commit is contained in:
1 parent
eb0a0ff2ff
commit
4f25e6d73b
3 files changed
+78
No files matched your search
@@ -44,7 +44,12 @@
|
|||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
<action android:name="com.samsung.android.support.REMOTE_ACTION" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
<meta-data
|
||||||
|
android:name="com.samsung.android.support.REMOTE_ACTION"
|
||||||
|
android:resource="@xml/spen_remote_actions" />
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.main.Launcher0"
|
android:name=".ui.main.Launcher0"
|
||||||
@@ -54,7 +59,12 @@
|
|||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
<action android:name="com.samsung.android.support.REMOTE_ACTION" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
<meta-data
|
||||||
|
android:name="com.samsung.android.support.REMOTE_ACTION"
|
||||||
|
android:resource="@xml/spen_remote_actions" />
|
||||||
</activity>
|
</activity>
|
||||||
<!-- 图标1 -->
|
<!-- 图标1 -->
|
||||||
<activity
|
<activity
|
||||||
@@ -65,7 +75,12 @@
|
|||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
<action android:name="com.samsung.android.support.REMOTE_ACTION" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
<meta-data
|
||||||
|
android:name="com.samsung.android.support.REMOTE_ACTION"
|
||||||
|
android:resource="@xml/spen_remote_actions" />
|
||||||
</activity>
|
</activity>
|
||||||
<!-- 图标2 -->
|
<!-- 图标2 -->
|
||||||
<activity
|
<activity
|
||||||
@@ -76,7 +91,12 @@
|
|||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
<action android:name="com.samsung.android.support.REMOTE_ACTION" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
<meta-data
|
||||||
|
android:name="com.samsung.android.support.REMOTE_ACTION"
|
||||||
|
android:resource="@xml/spen_remote_actions" />
|
||||||
</activity>
|
</activity>
|
||||||
<!-- 图标3 -->
|
<!-- 图标3 -->
|
||||||
<activity
|
<activity
|
||||||
@@ -87,7 +107,12 @@
|
|||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
<action android:name="com.samsung.android.support.REMOTE_ACTION" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
<meta-data
|
||||||
|
android:name="com.samsung.android.support.REMOTE_ACTION"
|
||||||
|
android:resource="@xml/spen_remote_actions" />
|
||||||
</activity>
|
</activity>
|
||||||
<!-- 图标4 -->
|
<!-- 图标4 -->
|
||||||
<activity
|
<activity
|
||||||
@@ -98,7 +123,12 @@
|
|||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
<action android:name="com.samsung.android.support.REMOTE_ACTION" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
<meta-data
|
||||||
|
android:name="com.samsung.android.support.REMOTE_ACTION"
|
||||||
|
android:resource="@xml/spen_remote_actions" />
|
||||||
</activity>
|
</activity>
|
||||||
<!-- 图标5 -->
|
<!-- 图标5 -->
|
||||||
<activity
|
<activity
|
||||||
@@ -109,7 +139,12 @@
|
|||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
<action android:name="com.samsung.android.support.REMOTE_ACTION" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
<meta-data
|
||||||
|
android:name="com.samsung.android.support.REMOTE_ACTION"
|
||||||
|
android:resource="@xml/spen_remote_actions" />
|
||||||
</activity>
|
</activity>
|
||||||
<!-- 图标6 -->
|
<!-- 图标6 -->
|
||||||
<activity
|
<activity
|
||||||
@@ -120,7 +155,12 @@
|
|||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
<action android:name="com.samsung.android.support.REMOTE_ACTION" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
<meta-data
|
||||||
|
android:name="com.samsung.android.support.REMOTE_ACTION"
|
||||||
|
android:resource="@xml/spen_remote_actions" />
|
||||||
</activity>
|
</activity>
|
||||||
<!-- 主界面 -->
|
<!-- 主界面 -->
|
||||||
<activity
|
<activity
|
||||||
@@ -132,7 +172,12 @@
|
|||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
<action android:name="com.samsung.android.support.REMOTE_ACTION" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
<meta-data
|
||||||
|
android:name="com.samsung.android.support.REMOTE_ACTION"
|
||||||
|
android:resource="@xml/spen_remote_actions" />
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.welcome.WelcomeActivity"
|
android:name=".ui.welcome.WelcomeActivity"
|
||||||
|
|||||||
@@ -975,6 +975,20 @@ class ReadBookController(
|
|||||||
handleKeyPage(PageDirection.NEXT, longPress)
|
handleKeyPage(PageDirection.NEXT, longPress)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
KeyEvent.KEYCODE_MEDIA_NEXT -> {
|
||||||
|
if (ReadBook.book != null) {
|
||||||
|
ReadBook.moveToNextChapter(true)
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
KeyEvent.KEYCODE_MEDIA_PREVIOUS -> {
|
||||||
|
if (ReadBook.book != null) {
|
||||||
|
ReadBook.moveToPrevChapter(upContent = true, toLast = false)
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
trigger_key="PAGE_DOWN">
|
trigger_key="PAGE_DOWN">
|
||||||
<preference name="gesture" value="click" />
|
<preference name="gesture" value="click" />
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
<action
|
<action
|
||||||
id="prev_page"
|
id="prev_page"
|
||||||
label="@string/prev_page"
|
label="@string/prev_page"
|
||||||
@@ -20,4 +21,22 @@
|
|||||||
trigger_key="PAGE_UP">
|
trigger_key="PAGE_UP">
|
||||||
<preference name="gesture" value="double_click" />
|
<preference name="gesture" value="double_click" />
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
|
<action
|
||||||
|
id="prev_chapter"
|
||||||
|
label="@string/previous_chapter"
|
||||||
|
priority="3"
|
||||||
|
repeatable="false"
|
||||||
|
trigger_key="MEDIA_PREVIOUS">
|
||||||
|
<preference name="gesture" value="move_left" />
|
||||||
|
</action>
|
||||||
|
|
||||||
|
<action
|
||||||
|
id="next_chapter"
|
||||||
|
label="@string/next_chapter"
|
||||||
|
priority="4"
|
||||||
|
repeatable="false"
|
||||||
|
trigger_key="MEDIA_NEXT">
|
||||||
|
<preference name="gesture" value="move_right" />
|
||||||
|
</action>
|
||||||
</remote-actions>
|
</remote-actions>
|
||||||
Reference in new issue
Block a user