Author Topic: Android Button click hover problem  (Read 3515 times)

hrlarsen

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 35
    • View Profile
Android Button click hover problem
« on: September 24, 2014, 07:55:18 AM »
Hi

I've found a problem on Android which makes buttons go to hover state right after a button is clicked and the button is switched. To make that make sense, let me try to explain.

I have 2 prefabs, which is basically 2 different screens. The two prefabs have a button placed at the same area (top left corner). When I press the button in the first prefab it destroy's that prefab, and instatiate prefab number 2. The button placed at the same area in prefab 2 then sets it's state to "normal", but just after it sets the state to "hover" and thereby the button looks like it is hovered, even though it should not be.

Hope this makes sense.

The problem is only occouring on Android, not iOS or editor. The problem startet to occour after upgrading to 3.7.3

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Android Button click hover problem
« Reply #1 on: September 24, 2014, 02:44:18 PM »
Turn off mouse events on your UICamera.

hrlarsen

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 35
    • View Profile
Re: Android Button click hover problem
« Reply #2 on: September 25, 2014, 02:07:34 AM »
Thanks! who'd know it was that simple :D

Andrey Postelzhuk

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Android Button click hover problem
« Reply #3 on: January 16, 2015, 04:11:02 AM »
I had the same problem. Thanks.