Feature/pointer mode drag fix#44
Merged
Merged
Conversation
…lity - Added drawable resources for handle bar background and icons for landscape/portrait orientation. - Created a new layout for the main activity in portrait mode, including a shortcut strip, video stream area, module drawer, and module selector bar. - Introduced IME and keyboard modules for portrait mode with buttons for special keys. - Added mouse module layout for portrait mode with a touchpad and mouse button strip. - Updated strings.xml with orientation toggle strings. - Implemented orientation change handling in the AspectRatioTextureView class. - Added test scripts for verifying orientation changes and app stability during transitions.
- Created a new layout file for keyboard testing (activity_keyboard_test.xml) with a structured 4-zone layout including a shortcut bar, video area, module drawer, and navigation bar. - Introduced a keyboard toolbar layout (keyboard_toolbar.xml) featuring various buttons for keyboard functionalities. - Updated the portrait keyboard layout (module_portrait_keyboard.xml) to utilize a custom PortraitKeyboardView and removed redundant toolbar elements. - Added new dimensions in dimens.xml for better spacing and layout management in the keyboard module.
- Added KeyPreviewPopup class to show a bubble above pressed keys. - Created layout for key preview popup with background drawable. - Introduced keyboard settings dialog layout with sound and vibration options. - Updated main activity layout to include a settings button. - Added drawable for key preview background.
- 保留了所有 portrait 模式功能(4-Zone布局、keyboard/mouse/IME模块) - 集成了 VNC 和 WebRTC 服务器功能 - 保留了 KeyboardTestActivity - 使用 HidManager 替代 KeyBoardManager/MouseManager - 保留了所有现有功能,无功能减少
- Simplified mouse layout: removed touchpad area, kept only L/M/R buttons and scroll wheel - Enhanced MouseControlStripView with scroll wheel up/down buttons - Implemented continuous scroll acceleration on scroll wheel long-press - Added gesture guide area and icon resources - Updated landscape and portrait layout files Referenced KeyCMD implementation to optimize user experience. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Updated layout files for portrait IME and mouse modules to use color resources instead of hardcoded values, enhancing maintainability. - Simplified and clarified comments in XML layout files for better understanding of component functionality. - Introduced new color resources for dark mode to ensure a cohesive look across different themes. - Modified themes to align with Material Design 3 standards, updating primary and secondary colors for better visual hierarchy. - Added new styles for keycaps and scroll strip chevrons to standardize button appearances across the application. - Enhanced string resources by adding missing translations for function keys.
- Created dialog layout for target OS picker with radio buttons for Windows, macOS, and Linux. - Implemented theme picker dialog layout with RecyclerView for color selection and radio buttons for light, dark, and system modes. - Added shortcut manager fragment layout with header and RecyclerView for displaying profiles. - Introduced item layouts for character alternates and shortcut profiles, enhancing UI for user interactions. - Developed theme color item layout for displaying selectable theme colors. - Updated portrait settings module to include theme and OS settings sections. - Added popup layout for character alternates. - Created a dedicated layout for theme settings section. - Enhanced night mode color resources for better theme support. - Introduced new theme styles for various color themes in night mode. - Updated color resources for theme accents. - Adjusted dimensions for keyboard key margins. - Expanded string resources for target OS configuration. - Refined main theme styles to incorporate new color themes and improve overall UI consistency.
… and consistency - Updated button text colors from black to a theme-aware color `text_on_surface` in `short_cut_button.xml` and `system_button.xml` for better visibility in both light and dark modes. - Added new color definitions for `text_on_surface`, `surface_background`, and `popup_background` in `colors.xml` and `colors-night.xml` to support theme-aware designs. - Adjusted keyboard button dimensions in `dimens.xml` to reduce padding and margins for a more compact layout.
- Updated comments and documentation in ShaderConst.java to provide clearer explanations of shader functions and constants. - Improved comments in TextureOffscreen.java for better understanding of offscreen rendering and texture management. - Clarified comments in RendererHolder.java and RendererSurface.java regarding surface clearing and rendering behavior. - Enhanced documentation in DeviceFilter.java and USBMonitor.java to improve clarity on device filtering and USB operations. - Updated FpsCounter.java and ViewAnimationHelper.java to provide clearer descriptions of frame counting and animation methods. - Improved interface documentation in IAspectRatioView.java for aspect ratio maintenance. - Refined color resource comments in colors.xml for better clarity on ARGB specification. - Enhanced permission strings in strings_permissions.xml for clearer understanding of required permissions.
There was a problem hiding this comment.
Pull request overview
This PR substantially expands the app’s portrait-mode UX and theming infrastructure while also adjusting touch handling/zoom behavior and making several library/comment cleanups.
Changes:
- Adds portrait-mode modules (keyboard/mouse/IME/settings) plus new shortcut/profile UI components and supporting adapters/models.
- Introduces theme color family + light/dark/system mode management (ThemeManager) and new color/theme resources (incl. night variants).
- Updates pointer/zoom handling for portrait mode (auto-pan while zoomed) and relaxes MainActivity orientation constraints (sensor + configChanges).
Reviewed changes
Copilot reviewed 163 out of 165 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| test_orientation.sh | Adds an adb-based orientation test script. |
| test_orientation_v2.sh | Adds a more structured orientation test suite script. |
| libvncserver/src/main/jni/vnc_server/vnc_server_jni.c | Adjusts VNC server startup behavior (encoding/quality/compress handling changed). |
| libuvccamera/src/main/res/values/strings_permissions.xml | Translates permission comments to English. |
| libuvccamera/src/main/res/values/colors.xml | Translates comment to English. |
| libuvccamera/src/main/java/com/serenegiant/widget/IAspectRatioView.java | Translates Javadoc to English. |
| libuvccamera/src/main/java/com/serenegiant/widget/AspectRatioTextureView.java | Re-enables aspect-ratio change detection + layout request. |
| libuvccamera/src/main/java/com/serenegiant/utils/FpsCounter.java | Translates comments to English. |
| libuvccamera/src/main/java/com/serenegiant/usb/UVCCamera.java | Translates inline comment to English. |
| libuvccamera/src/main/java/com/serenegiant/usb/USBMonitor.java | Translates inline comment to English. |
| libuvccamera/src/main/java/com/serenegiant/usb/DeviceFilter.java | Translates multiple comments/Javadoc to English. |
| libuvccamera/src/main/java/com/serenegiant/opengl/renderer/RendererSurface.java | Translates comments to English. |
| libuvccamera/src/main/java/com/serenegiant/opengl/renderer/RendererHolder.java | Translates comments to English. |
| libuvccamera/src/main/java/com/serenegiant/opengl/GLHelper.java | Translates comments to English. |
| libuvccamera/src/main/java/com/serenegiant/opengl/EGLBase14.java | Translates comments to English. |
| libuvccamera/src/main/java/com/serenegiant/opengl/EGLBase10.java | Translates comments to English. |
| libuvccamera/src/main/java/com/serenegiant/encoder/MediaEncoder.java | Fixes whitespace in Javadoc param description. |
| libuvccamera/src/main/java/com/openterface/AOS/ImageCapture2.java | Translates image buffer alignment comments to English. |
| app/src/main/res/values/styles.xml | Adds keycap/scroll strip related styles. |
| app/src/main/res/values/strings.xml | Adds orientation + target OS strings and Key_FN. |
| app/src/main/res/values/dimens.xml | Adds portrait keyboard spacing dimens. |
| app/src/main/res/values/colors.xml | Adds expanded palette for theming + key/touchpad colors. |
| app/src/main/res/values/colors_theme.xml | Adds theme accent color families. |
| app/src/main/res/values-night/themes.xml | Adds Material3-based night theme variants. |
| app/src/main/res/values-night/colors.xml | Adds dark-mode color overrides. |
| app/src/main/res/values-night/colors_theme.xml | Adds additional night theme color resources. |
| app/src/main/res/layout/touchpad_overlay.xml | Reworks landscape touchpad overlay layout (guide + strip + buttons). |
| app/src/main/res/layout/short_cut_button.xml | Updates shortcut button text colors for theme awareness. |
| app/src/main/res/layout/settings_theme_section.xml | Adds a settings section layout for theme selection. |
| app/src/main/res/layout/popup_character_alternates.xml | Adds popup container for alternates UI. |
| app/src/main/res/layout/module_portrait_mouse.xml | Adds portrait mouse module layout. |
| app/src/main/res/layout/module_portrait_keyboard.xml | Adds portrait keyboard module wrapper layout. |
| app/src/main/res/layout/module_portrait_ime.xml | Adds portrait IME/text input module layout. |
| app/src/main/res/layout/keyboard_toolbar.xml | Adds a new toolbar layout for keyboard actions. |
| app/src/main/res/layout/key_preview_popup.xml | Adds key preview popup layout. |
| app/src/main/res/layout/item_theme_color.xml | Adds theme color picker row item layout. |
| app/src/main/res/layout/item_shortcut_profile.xml | Adds shortcut profile card item layout. |
| app/src/main/res/layout/item_key_button.xml | Adds key selection grid item layout. |
| app/src/main/res/layout/item_hub_shortcut_row.xml | Adds hub shortcut “row” item layout. |
| app/src/main/res/layout/item_hub_shortcut_card.xml | Adds hub shortcut “card” item layout. |
| app/src/main/res/layout/item_hub_profile_row.xml | Adds hub profile list row layout. |
| app/src/main/res/layout/item_character_alternate.xml | Adds alternates option item layout. |
| app/src/main/res/layout/fragment_shortcut_manager.xml | Adds shortcut manager fragment layout. |
| app/src/main/res/layout/drawer_layout_setup.xml | Adds an orientation toggle button to drawer UI. |
| app/src/main/res/layout/dialog_webrtc_server_settings.xml | Updates dialog title text color to theme-aware. |
| app/src/main/res/layout/dialog_vnc_server_settings.xml | Updates dialog title text color to theme-aware. |
| app/src/main/res/layout/dialog_theme_picker.xml | Adds a theme picker dialog layout. |
| app/src/main/res/layout/dialog_target_os_picker.xml | Adds a target OS picker dialog layout. |
| app/src/main/res/layout/dialog_settings_floating.xml | Adds a floating settings dialog container layout. |
| app/src/main/res/layout/dialog_keyboard_settings.xml | Adds keyboard settings dialog UI. |
| app/src/main/res/layout/dialog_create_shortcut.xml | Adds create/edit shortcut dialog UI. |
| app/src/main/res/layout/dialog_create_profile.xml | Adds create profile dialog UI. |
| app/src/main/res/layout/activity_main.xml | Updates colors/backgrounds for theme + surface usage. |
| app/src/main/res/layout/activity_keyboard_test.xml | Adds a keyboard test activity layout. |
| app/src/main/res/layout-port/portrait_key_button.xml | Adds a portrait key button layout (with alternate hint). |
| app/src/main/res/drawable/space_bar_icon.xml | Adds vector icon for space key. |
| app/src/main/res/drawable/shortcut_button_background.xml | Adds selector for shortcut buttons. |
| app/src/main/res/drawable/press_button_background.xml | Updates pressed background shape styling. |
| app/src/main/res/drawable/popup_alternates_background.xml | Adds background for alternates popup. |
| app/src/main/res/drawable/nopress_button_background.xml | Updates normal background shape styling. |
| app/src/main/res/drawable/km_basic_touchpad_surface.xml | Adds touchpad surface layer-list background. |
| app/src/main/res/drawable/km_basic_touchpad_mouse_button_background.xml | Adds selector background for mouse strip buttons. |
| app/src/main/res/drawable/km_basic_scroll_strip_chevron_up.xml | Adds chevron-up vector. |
| app/src/main/res/drawable/km_basic_scroll_strip_chevron_down.xml | Adds chevron-down vector. |
| app/src/main/res/drawable/km_basic_mouse_guide_background.xml | Adds mouse guide container background. |
| app/src/main/res/drawable/key_preview_background.xml | Adds key preview bubble background. |
| app/src/main/res/drawable/key_background.xml | Adds generic key background selector. |
| app/src/main/res/drawable/ic_star_filled_24.xml | Adds filled star icon. |
| app/src/main/res/drawable/ic_star_border_24.xml | Adds outlined star icon. |
| app/src/main/res/drawable/ic_shortcut_default.xml | Adds default shortcut/profile icon. |
| app/src/main/res/drawable/ic_shortcut_24.xml | Adds shortcut icon. |
| app/src/main/res/drawable/ic_screen_rotation_24.xml | Adds screen rotation icon. |
| app/src/main/res/drawable/ic_refresh_24.xml | Adds refresh icon. |
| app/src/main/res/drawable/ic_portrait_24.xml | Adds portrait icon. |
| app/src/main/res/drawable/ic_palette_24.xml | Adds palette icon. |
| app/src/main/res/drawable/ic_os_windows.xml | Adds Windows OS icon. |
| app/src/main/res/drawable/ic_os_macos.xml | Adds macOS OS icon. |
| app/src/main/res/drawable/ic_os_linux.xml | Adds Linux OS icon. |
| app/src/main/res/drawable/ic_more_vert_24.xml | Adds overflow icon. |
| app/src/main/res/drawable/ic_list_24.xml | Adds list icon. |
| app/src/main/res/drawable/ic_landscape_24.xml | Adds landscape icon. |
| app/src/main/res/drawable/ic_import.xml | Adds import icon. |
| app/src/main/res/drawable/ic_export.xml | Adds export icon. |
| app/src/main/res/drawable/ic_edit.xml | Adds edit icon. |
| app/src/main/res/drawable/ic_delete.xml | Adds delete icon. |
| app/src/main/res/drawable/ic_content_copy.xml | Adds copy icon. |
| app/src/main/res/drawable/ic_chevron_right_24.xml | Adds chevron-right icon. |
| app/src/main/res/drawable/ic_check.xml | Adds check icon. |
| app/src/main/res/drawable/ic_check_circle_24.xml | Adds check-circle icon. |
| app/src/main/res/drawable/ic_arrow_back_24.xml | Adds back arrow icon. |
| app/src/main/res/drawable/ic_add.xml | Adds add icon. |
| app/src/main/res/drawable/ic_add_24.xml | Adds add icon variant. |
| app/src/main/res/drawable/handle_bar_background.xml | Adds drag handle bar background. |
| app/src/main/res/drawable/button_background.xml | Updates button selector to new key colors. |
| app/src/main/res/drawable/bg_theme_color_selected.xml | Adds selected state background for theme picker rows. |
| app/src/main/res/drawable/bg_theme_color_normal.xml | Adds normal state background for theme picker rows. |
| app/src/main/res/drawable/bg_circle_primary.xml | Adds circular primary background shape. |
| app/src/main/res/drawable/basic_compose_editor_background.xml | Adds editor background selector. |
| app/src/main/res/drawable/baseline_mouse_24.xml | Updates mouse vector/tint handling. |
| app/src/main/res/drawable/baseline_keyboard_arrow_up_24.xml | Adds arrow-up vector. |
| app/src/main/res/drawable/baseline_keyboard_arrow_down_24.xml | Adds arrow-down vector. |
| app/src/main/res/drawable/baseline_keyboard_24.xml | Replaces keyboard icon vector. |
| app/src/main/res/drawable/alternate_item_selected.xml | Adds selected background for alternates items. |
| app/src/main/res/drawable/alternate_item_normal.xml | Adds normal background for alternates items. |
| app/src/main/java/com/openterface/AOS/view/PortraitKeyboardView.java | Adds a portrait keyboard view wrapper. |
| app/src/main/java/com/openterface/AOS/view/KeyPreviewPopup.java | Adds key-press preview popup behavior. |
| app/src/main/java/com/openterface/AOS/view/CharacterAlternatesPopup.java.patch | Adds a stray patch fragment file (non-source). |
| app/src/main/java/com/openterface/AOS/serial/CustomTouchListener.java | Adds portrait zoom state + auto-pan behavior during moves. |
| app/src/main/java/com/openterface/AOS/MyApplication.java | Initializes and applies saved theme mode on startup. |
| app/src/main/java/com/openterface/AOS/model/ShortcutProfile.java | Adds shortcut profile model and helper methods. |
| app/src/main/java/com/openterface/AOS/model/CharacterAlternates.java | Adds alternates mapping for long-press characters. |
| app/src/main/java/com/openterface/AOS/manager/ThemeManager.java | Adds theme family + mode persistence and application. |
| app/src/main/java/com/openterface/AOS/manager/TargetOsManager.java | Adds target OS persistence and key labeling metadata. |
| app/src/main/java/com/openterface/AOS/KeyBoardClick/PortraitKeyAlternates.java | Adds portrait keyboard alternates mapping (KeyCMD-like). |
| app/src/main/java/com/openterface/AOS/KeyBoardClick/ModifierKeyHelper.java | Adds null guard for modifier key helper wiring. |
| app/src/main/java/com/openterface/AOS/KeyBoardClick/KeyBoardWin.java | Refactors Win modifier key handling to accept rootView + popup. |
| app/src/main/java/com/openterface/AOS/KeyBoardClick/KeyBoardShortCut.java | Refactors shortcut handling to use rootView + null guards. |
| app/src/main/java/com/openterface/AOS/KeyBoardClick/KeyBoardShift.java | Refactors Shift modifier key handling to accept rootView + popup. |
| app/src/main/java/com/openterface/AOS/KeyBoardClick/KeyboardSettingsManager.java | Adds persistence + sound/vibration feedback manager. |
| app/src/main/java/com/openterface/AOS/KeyBoardClick/KeyBoardOpacity.java | Adds portrait-friendly constructor + null checks. |
| app/src/main/java/com/openterface/AOS/KeyBoardClick/KeyBoardCtrl.java | Refactors Ctrl modifier key handling to accept rootView + popup. |
| app/src/main/java/com/openterface/AOS/KeyBoardClick/KeyBoardClose.java | Refactors close behavior with portrait-safe null checks. |
| app/src/main/java/com/openterface/AOS/KeyBoardClick/KeyBoardAlt.java | Refactors Alt modifier key handling to accept rootView + popup. |
| app/src/main/java/com/openterface/AOS/fragment/SettingsFloatingFragment.java | Adds floating settings fragment with swipe/overlay dismiss. |
| app/src/main/java/com/openterface/AOS/drawerLayout/ZoomLayoutDeal.java | Adds guards for missing views in portrait mode. |
| app/src/main/java/com/openterface/AOS/drawerLayout/DrawerLayoutDeal.java | Wires new screen orientation toggle action. |
| app/src/main/java/com/openterface/AOS/dialog/TargetOsPickerDialog.java | Adds target OS selection dialog. |
| app/src/main/java/com/openterface/AOS/adapter/ThemeColorAdapter.java | Adds RecyclerView adapter for theme families. |
| app/src/main/java/com/openterface/AOS/adapter/ShortcutProfileAdapter.java | Adds RecyclerView adapter for shortcut profiles. |
| app/src/main/java/com/openterface/AOS/adapter/HubShortcutAdapter.java | Adds hub shortcut adapter (card/row modes). |
| app/src/main/java/com/openterface/AOS/adapter/HubProfileAdapter.java | Adds hub profile list adapter. |
| app/src/main/java/com/openterface/AOS/activity/KeyboardTestActivity.java | Adds a UI test activity for portrait keyboard. |
| app/src/main/AndroidManifest.xml | Enables sensor orientation/configChanges; adds test activity entry. |
| app/build.gradle | Updates NDK version and adds FlexboxLayout dependency. |
| .gitignore | Ignores .codegraph/*. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+47
to
+49
| // Apply saved theme mode (dark/light/system) before any Activity is created | ||
| ThemeManager.getInstance().initialize(this); | ||
| ThemeManager.getInstance().applyThemeMode(ThemeManager.getInstance().getThemeMode()); |
Comment on lines
+49
to
+55
| public int getShortcutCount() { | ||
| int count = shortcuts != null ? shortcuts.size() : 0; | ||
| if (categories != null) { | ||
| for (ShortcutCategory cat : categories) count += cat.shortcuts.size(); | ||
| } | ||
| return count; | ||
| } |
Comment on lines
+63
to
+74
| <!-- Test Activity for Keyboard Module --> | ||
| <activity | ||
| android:name="com.openterface.AOS.activity.KeyboardTestActivity" | ||
| android:label="Keyboard Test" | ||
| android:exported="true" | ||
| android:screenOrientation="portrait" | ||
| android:theme="@style/Theme.Usbvideo"> | ||
| <intent-filter> | ||
| <action android:name="android.intent.action.MAIN" /> | ||
| <category android:name="android.intent.category.DEFAULT" /> | ||
| </intent-filter> | ||
| </activity> |
Comment on lines
+152
to
154
| /* Note: Encoding, quality and compression settings are per-client in this version of libvncserver */ | ||
| /* They will be set to defaults when clients connect */ | ||
|
|
Comment on lines
+1
to
+3
| // 在 show() 方法中设置文字颜色 | ||
| int textColor = androidx.core.content.ContextCompat.getColor(context, R.color.popup_text); | ||
| optionView.setTextColor(textColor); No newline at end of file |
Comment on lines
+16
to
+22
| <TextView | ||
| android:layout_width="0dp" | ||
| android:layout_height="wrap_content" | ||
| android:layout_weight="1" | ||
| android:text="按键音效" | ||
| android:textSize="16sp" | ||
| android:textColor="@android:color/black" /> |
Comment on lines
+68
to
+74
| <TextView | ||
| android:layout_width="0dp" | ||
| android:layout_height="wrap_content" | ||
| android:layout_weight="1" | ||
| android:text="振动反馈" | ||
| android:textSize="16sp" | ||
| android:textColor="@android:color/black" /> |
Comment on lines
+4
to
+6
| ADB="/Users/txa/Library/Android/sdk/platform-tools/adb" | ||
| DEVICE="192.168.100.83:34341" | ||
| APP_PACKAGE="com.openterface.AOS" |
Comment on lines
+4
to
+6
| ADB="/Users/txa/Library/Android/sdk/platform-tools/adb" | ||
| DEVICE="192.168.100.83:34341" | ||
| APP_PACKAGE="com.openterface.AOS" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.