Skip to content

Special character list UX improvement - ABC mode #1046

@Tonigau

Description

@Tonigau

For Special character suggestion list in ModeABC,
Swipe-scroll & tap are enabled on this list (Like with Special Chr's list for 123 Mode) but the auto accept is too quick to be usable.
In ModeABC 'LongPress 1 key' is already used, so maybe we can call cancelDelayedAccept on list swipe.
This would have...

  • Previous UI behavior until list is intentionally swiped.
  • When swiped list operates like Mode123 special characters list.
  • Will enable only for scrollable list.

I have tested it's quite easy to swipe list after multitap the 1 button, with setting ALS=Quick.

Problem:
When in ABC-mode, multi-tapping the 1 key then swiping(scroll left) the special-character suggestion list, delayed accept is still active, this gets only the first character selection.

Cause:
Delayed accept timer is not cancelled when the user performs a deliberate horizontal scroll gesture on the suggestions bar.

Proposed solution:
Run SuggestionOps.cancelDelayedAccept() once per gesture when horizontal scroll intent is detected (using touchSlop and canScrollHorizontally).
This enables behaviour like 123-Mode where the list can be swipe scrolled & tap to accept.
This solution can improve the UX of unknown next chr scrolled into view when multi-tap the 1 key in ABC-Mode, See Issue: #1038.

Behavior:
Only triggers on deliberate horizontal movement.
Does not affect existing tap or long-press behavior.
Behavior after swipe matches 123-mode list interaction.
Added code active is benign when swipe(scroll) to navigate list.

Test status:
Logic reviewed; unable to (ATM) run full build locally due to Windows 7 / Gradle 8 native incompatibility.
With setting ALS=Slow(current code), confirmed ABC-mode special chr list swipe & tap functionality.

With the code below we can get the gist of how it might work.

// Cancel delayed accept when user intends to scroll suggestions - ModeABC special characters,
// with measures to prevent accidental selection during swipe.
// Result = behavior like Mode123 special chr's list.

//in class SuggestionsBar {  

private float downX;
private float downY;
private boolean canceledAutoAccept;
private int touchSlop;

touchSlop = ViewConfiguration.get(context).getScaledTouchSlop();


//in function private boolean onTouch...

case MotionEvent.ACTION_DOWN:
    downX = event.getRawX();
    downY = event.getRawY();
    canceledAutoAccept = false;
    
    // Existing _DOWN code
    mainView.onResizeStart(event.getRawY());
    return true;

case MotionEvent.ACTION_MOVE:
    float dx = event.getRawX() - downX;
    float dy = event.getRawY() - downY;

    // Detect deliberate horizontal scroll intent
    if (!canceledAutoAccept
            && Math.abs(dx) > Math.abs(dy)
            && Math.abs(dx) > touchSlop
            && mView.canScrollHorizontally(dx > 0 ? -1 : 1)) {

        suggestionOps.cancelDelayedAccept();
        canceledAutoAccept = true;
    }

    // Existing _MOVE code
    if (settings.getDragResize()) {
        mainView.onResizeThrottled(event.getRawY());
    }
    return true;

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions