Compare commits

...

7 commits

Author SHA1 Message Date
Hendika N.
f525d3a37d
Merge 941b06b258 into 8948b34243 2025-03-03 15:52:00 +01:00
8948b34243
0.0.23
Some checks are pending
Android CI / build (push) Waiting to run
2025-03-02 23:04:59 +01:00
f18811bfa2
Merge pull request #111 from toolatebot/weblate-jrpie-launcher-launcher
Translations update from Toolate
2025-03-02 23:00:17 +01:00
bd1f999a0e
Merge branch 'master' of https://github.com/jrpie/Launcher 2025-03-02 22:41:13 +01:00
Symphonic9861
d44224071f Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 84.9% (214 of 252 strings)

Translation: jrpie-Launcher/Launcher
Translate-URL: https://toolate.othing.xyz/projects/jrpie-launcher/launcher/zh_Hans/
2025-02-21 09:07:16 +00:00
Symphonic9861
1f8f75dec8 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 76.9% (194 of 252 strings)

Translation: jrpie-Launcher/Launcher
Translate-URL: https://toolate.othing.xyz/projects/jrpie-launcher/launcher/zh_Hans/
2025-02-19 11:17:04 +00:00
88a78749c2
add action: media play / pause 2025-02-17 00:31:18 +01:00
6 changed files with 94 additions and 53 deletions

View file

@ -23,8 +23,8 @@ android {
minSdkVersion 21
targetSdkVersion 35
compileSdk 35
versionCode 38
versionName "0.0.22"
versionCode 39
versionName "0.0.23"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View file

@ -82,22 +82,32 @@ enum class LauncherAction(
VOLUME_UP(
"volume_up",
R.string.list_other_volume_up,
R.drawable.baseline_volume_up_24, ::audioVolumeUp
R.drawable.baseline_volume_up_24,
{ context -> audioVolumeAdjust(context, true)}
),
VOLUME_DOWN(
"volume_down",
R.string.list_other_volume_down,
R.drawable.baseline_volume_down_24, ::audioVolumeDown
R.drawable.baseline_volume_down_24,
{ context -> audioVolumeAdjust(context, false)}
),
TRACK_PLAY_PAUSE(
"play_pause_track",
R.string.list_other_track_play_pause,
R.drawable.baseline_play_arrow_24,
{ context -> audioManagerPressKey(context, KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE)}
),
TRACK_NEXT(
"next_track",
R.string.list_other_track_next,
R.drawable.baseline_skip_next_24, ::audioNextTrack
R.drawable.baseline_skip_next_24,
{ context -> audioManagerPressKey(context, KeyEvent.KEYCODE_MEDIA_NEXT)}
),
TRACK_PREV(
"previous_track",
R.string.list_other_track_previous,
R.drawable.baseline_skip_previous_24, ::audioPreviousTrack
R.drawable.baseline_skip_previous_24,
{ context -> audioManagerPressKey(context, KeyEvent.KEYCODE_MEDIA_PREVIOUS)}
),
EXPAND_NOTIFICATIONS_PANEL(
"expand_notifications_panel",
@ -155,56 +165,32 @@ enum class LauncherAction(
/* Media player actions */
private fun audioNextTrack(context: Context) {
private fun audioManagerPressKey(context: Context, key: Int) {
val mAudioManager = context.getSystemService(Context.AUDIO_SERVICE) as AudioManager
val eventTime: Long = SystemClock.uptimeMillis()
val downEvent =
KeyEvent(eventTime, eventTime, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MEDIA_NEXT, 0)
KeyEvent(eventTime, eventTime, KeyEvent.ACTION_DOWN, key, 0)
mAudioManager.dispatchMediaKeyEvent(downEvent)
val upEvent = KeyEvent(eventTime, eventTime, KeyEvent.ACTION_UP, KeyEvent.KEYCODE_MEDIA_NEXT, 0)
val upEvent = KeyEvent(eventTime, eventTime, KeyEvent.ACTION_UP, key, 0)
mAudioManager.dispatchMediaKeyEvent(upEvent)
}
private fun audioPreviousTrack(context: Context) {
val mAudioManager = context.getSystemService(Context.AUDIO_SERVICE) as AudioManager
val eventTime: Long = SystemClock.uptimeMillis()
val downEvent =
KeyEvent(eventTime, eventTime, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MEDIA_PREVIOUS, 0)
mAudioManager.dispatchMediaKeyEvent(downEvent)
val upEvent =
KeyEvent(eventTime, eventTime, KeyEvent.ACTION_UP, KeyEvent.KEYCODE_MEDIA_PREVIOUS, 0)
mAudioManager.dispatchMediaKeyEvent(upEvent)
}
private fun audioVolumeUp(context: Context) {
private fun audioVolumeAdjust(context: Context, louder: Boolean) {
val audioManager =
context.getSystemService(Context.AUDIO_SERVICE) as AudioManager
audioManager.adjustStreamVolume(
AudioManager.STREAM_MUSIC,
AudioManager.ADJUST_RAISE,
if (louder) {
AudioManager.ADJUST_RAISE
} else {
AudioManager.ADJUST_LOWER
},
AudioManager.FLAG_SHOW_UI
)
}
private fun audioVolumeDown(context: Context) {
val audioManager =
context.getSystemService(Context.AUDIO_SERVICE) as AudioManager
audioManager.adjustStreamVolume(
AudioManager.STREAM_MUSIC,
AudioManager.ADJUST_LOWER,
AudioManager.FLAG_SHOW_UI
)
}
/* End media player actions */
private fun toggleTorch(context: Context) {
@ -320,5 +306,4 @@ private class LauncherActionSerializer : KSerializer<LauncherAction> {
encodeSerializableElement(descriptor, 0, String.serializer(), value.id)
}
}
}

View file

@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="?attr/colorControlNormal"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?android:textColor"
android:pathData="M8,5v14l11,-7z" />
</vector>

View file

@ -28,7 +28,7 @@
<string name="settings_gesture_left_top_edge">左(顶部)</string>
<string name="settings_gesture_up_left_edge">上(左边缘)</string>
<string name="settings_gesture_up_right_edge">上(右边缘)</string>
<string name="settings_gesture_down_left_edge">(左边缘)</string>
<string name="settings_gesture_down_left_edge">下(左边缘)</string>
<string name="settings_gesture_down_right_edge">下(右边缘)</string>
<string name="settings_gesture_vol_up">音量加</string>
<string name="settings_gesture_vol_down">音量减</string>
@ -40,7 +40,7 @@
<string name="settings_apps_view_all">浏览全部应用</string>
<string name="settings_apps_install">安装应用</string>
<string name="settings_apps_toast_store_not_found">没有找到应用市场</string>
<string name="settings_launcher_section_date_time">日期和时间</string>
<string name="settings_launcher_section_date_time"><![CDATA[日期和时间]]></string>
<string name="settings_theme_wallpaper">选择一个壁纸</string>
<string name="settings_launcher_change_wallpaper">换壁纸</string>
<string name="settings_display_screen_timeout_disabled">保持屏幕常亮</string>
@ -64,19 +64,19 @@
<string name="list_title_pick">选择应用</string>
<string name="tutorial_start_text">花几秒时间学下咋用这个启动器吧!</string>
<string name="tutorial_concept_title">概念</string>
<string name="tutorial_concept_text_2">该应用是开源的MIT许可并在 GitHub 上可用! \n \n一定要来看看代码仓库!</string>
<string name="tutorial_concept_text_2">该应用是开源的MIT许可并在 GitHub 上可用!一定要来看看代码仓库!</string>
<string name="tutorial_usage_title">使用方法</string>
<string name="tutorial_usage_text">您的主屏幕仅包含本地日期和时间,没有其它纷纷扰扰。</string>
<string name="tutorial_setup_title">设置</string>
<string name="tutorial_setup_text">我们为你选择了一些默认应用程序,你可以在此自定义。</string>
<string name="tutorial_setup_text">我们为您选择了一些默认应用。如果您愿意,现在可以更改它们:</string>
<string name="tutorial_setup_text_2">您也可以稍后更改选择。</string>
<string name="tutorial_finish_title">起飞</string>
<string name="tutorial_finish_title">开始</string>
<string name="list_tab_app">应用</string>
<string name="list_app_delete">卸载</string>
<string name="list_app_info">应用信息</string>
<string name="list_not_removed">无法移除应用</string>
<string name="list_removed">移除了选定的应用</string>
<string name="list_apps_search_hint">搜索应用</string>
<string name="list_apps_search_hint">搜索</string>
<string name="list_other_settings">启动器设置</string>
<string name="list_other_list">全部应用</string>
<string name="list_other_volume_up">音乐:大声</string>
@ -85,10 +85,10 @@
<string name="list_other_track_next">音乐:下一首</string>
<string name="list_other_nop">啥也不干</string>
<string name="tutorial_title">教程</string>
<string name="tutorial_concept_text">μLauncher 的设计是最小、高效且无干扰。 \n \n它不付费、无广告、不追踪。</string>
<string name="tutorial_concept_text">μLauncher 的设计是最小、高效且无干扰。它不付费、无广告、不追踪。</string>
<string name="tutorial_usage_text_2">您只需滑动屏幕或按下按钮即可启动应用程序。在下一步向导中选择一些应用程序。</string>
<string name="settings_general_choose_home_screen">将 μLauncher 设为默认桌面</string>
<string name="tutorial_finish_text">您已经准备好开始了! \n \n我希望这对你有很大的价值! \n \n- Finn (Launcher 的作者) \n以及 Josia(做了一些改进并维护了 μLauncher 分支)</string>
<string name="tutorial_finish_text">您已经准备好开始了!我希望这对您很有价值——FinnLauncher 作者)和 Josia做了一些改进并维护了 μLauncher 分支)</string>
<string name="settings_enabled_gestures_double_swipe">双滑动作</string>
<string name="settings_clock_localized">使用本地日期格式</string>
<string name="settings_clock_time_visible">显示时间</string>
@ -101,14 +101,14 @@
<string name="settings_display_rotate_screen">旋转屏幕</string>
<string name="settings_launcher_section_apps">应用</string>
<string name="list_other_expand_notifications_panel">展开通知面板</string>
<string name="alert_cant_expand_status_bar_panel">错误:无法打开通知栏。 \n这个动作使用的功能并非现有的 Android API的一部分。不幸的是它似乎不适用于您的设备。</string>
<string name="alert_cant_expand_status_bar_panel">错误:无法打开通知栏。这个动作使用的功能并非现有的 Android API 的一部分。不幸的是,它似乎不适用于您的设备。</string>
<string name="list_other_torch">开关手电筒</string>
<string name="alert_no_torch_found">未检测到带闪光灯的摄像头。</string>
<string name="alert_torch_access_exception">错误:无法访问闪光灯。</string>
<string name="screen_lock_method_dialog_title">选择锁屏方法</string>
<string name="settings_actions_lock_method">选择锁屏的方法</string>
<string name="settings_apps_hide_bound_apps">不要在应用抽屉中显示被绑定到手势的应用</string>
<string name="alert_requires_android_m">此功能需要 Android 6.0 或更高版本。</string>
<string name="alert_requires_android_m">此功能需要 Android 6 或更高版本。</string>
<string name="snackbar_app_hidden">应用程序已隐藏。您可在设置中让它再次显示。</string>
<string name="toast_device_admin_not_enabled">µLauncher 需要是设备管理员才能够锁定屏幕。</string>
<string name="device_admin_explanation">这是锁屏动作所必需的。</string>
@ -149,7 +149,7 @@
<string name="list_other_lock_screen">锁屏</string>
<string name="settings_theme_text_shadow">文本阴影</string>
<string name="settings_enabled_gestures_double_swipe_summary">双指滑动</string>
<string name="dialog_rename_ok"></string>
<string name="dialog_rename_ok">确定</string>
<string name="dialog_rename_title">重命名 %1$s</string>
<string name="settings_theme_color_theme_item_default">默认</string>
<string name="settings_theme_color_theme_item_dark">深色</string>
@ -175,4 +175,42 @@
<string name="alert_lock_screen_failed">错误:锁定屏幕失败。(如果您刚刚升级了应用程序,请尝试在手机设置中手动禁用并重新启用无障碍服务)</string>
<string name="settings_enabled_gestures_edge_swipe_summary">在屏幕边缘滑动</string>
<string name="accessibility_service_description">将 µLauncher 设为无障碍服务允许其锁定屏幕。请注意这需要过多的权限。你永远不应该轻易地授予任何应用程序这样的权限。µLauncher 将仅使用无障碍服务功能锁屏。您可以审计源代码。请注意,锁屏也可以通过授予 µLauncher 设备管理员权限来实现,然而,这种方法不适用于以指纹和面部解锁。</string>
</resources>
<string name="settings_gesture_back">返回</string>
<string name="dialog_select_color_red">红色</string>
<string name="dialog_select_color_blue">蓝色</string>
<string name="dialog_select_color_alpha">透明度</string>
<string name="dialog_select_color_green">绿色</string>
<string name="dialog_select_color_ok">确定</string>
<string name="settings_theme_color_theme_item_dynamic">动态</string>
<string name="list_title_private_space">私人空间</string>
<string name="list_other_list_private_space">私人空间</string>
<string name="dialog_choose_color_title">选择颜色</string>
<string name="dialog_select_color_color_hex">颜色</string>
<string name="dialog_report_bug_title">报告错误</string>
<string name="settings_gesture_swipe_larger"><![CDATA[>]]></string>
<string name="tooltip_lock_private_space">锁定私人空间</string>
<string name="settings_gesture_swipe_v">V</string>
<string name="settings_gesture_swipe_lambda">Λ</string>
<string name="settings_list_layout_item_text">文本</string>
<string name="settings_list_layout_item_grid">网格</string>
<string name="dialog_report_bug_create_report">创建报告</string>
<string name="tooltip_unlock_private_space">解锁私人空间</string>
<string name="settings_list_layout_item_default">默认</string>
<string name="settings_clock_color">颜色</string>
<string name="settings_gesture_swipe_smaller"><![CDATA[<]]></string>
<string name="dialog_report_bug_button_clipboard">复制到剪贴板</string>
<string name="alert_requires_android_v">此功能需要 Android 15 或更高版本。</string>
<string name="list_other_toggle_private_space_lock">切换私人空间锁</string>
<string name="dialog_consent_accessibility_ok">激活无障碍服务</string>
<string name="dialog_consent_accessibility_title">正在激活无障碍服务</string>
<string name="settings_meta_licenses">开源许可证</string>
<string name="legal_info_title">开源许可证</string>
<string name="pin_shortcut_switch_visible">在应用列表中显示</string>
<string name="pin_shortcut_title">添加快捷方式</string>
<string name="toast_private_space_locked">私人空间已锁定</string>
<string name="toast_private_space_unlocked">私人空间已解锁</string>
<string name="toast_private_space_not_available">私人空间不可用</string>
<string name="toast_private_space_default_home_screen">µLauncher 需要作为默认的主屏幕来访问私人空间。</string>
<string name="toast_activity_not_found_search_web">没有找到处理搜索的应用。</string>
<string name="toast_activity_not_found_browser">无法打开 URL找不到浏览器。</string>
</resources>

View file

@ -254,6 +254,7 @@
<string name="list_other_volume_down">Music: Quieter</string>
<string name="list_other_track_next">Music: Next</string>
<string name="list_other_track_previous">Music: Previous</string>
<string name="list_other_track_play_pause">Music: Play / Pause</string>
<string name="list_other_expand_notifications_panel">Expand notifications panel</string>
<string name="list_other_nop">Do nothing</string>
<string name="list_other_lock_screen">Lock Screen</string>

View file

@ -0,0 +1,5 @@
* Basic support for pinned shortcuts
* New action: Play / pause media playback
* New gestures: Tap and swipe up / down / left / right
* Improved Chinese translation (Thank you, Symphonic9861!)