Skip to content

Expose MotionEvent history #207

@rnikander

Description

@rnikander

Could we maybe put this behind a feature, or ?

Or could we just make that ndk_event field publicly accessible?

I think I need this for a drawing app. I say "think" since I haven't really experimented with the events yet, but I use the equivalent "coalesced touches" on iOS.

/*
XXX: Not currently supported with GameActivity so we don't currently expose for NativeActivity
either, for consistency.
/// Returns the size of the history contained in this event.
///
/// See [the NDK
/// docs](https://developer.android.com/ndk/reference/group/input#amotionevent_gethistorysize)
#[inline]
pub fn history_size(&self) -> usize {
self.ndk_event.history_size()
}
/// An iterator over the historical events contained in this event.
#[inline]
pub fn history(&self) -> HistoricalMotionEventsIter<'_> {
self.ndk_event.history()
}
*/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions