Search code examples
androidhoverstylus-pen

Do android supprot hovering buttons without a stylus?


I was wondering if Android supports "hover" events for fingers passing close enough to the phone surface. Samsung Galaxy S4 does supports such behavior, as can be seen on its default lock screen (pre-lollipop at least). On the other hand Android do provide a "OnHoverEvent" callback for views, it's just not being called... So, is it supported for stylus only?


Solution

  • Android's OnHoverListener event is called in 2 situations:

    a) when an S-Pen or similar stylus is close to the screen, or

    b) when a Bluetooth or USB mouse is connected.