开发者

Android button doesn't react

开发者 https://www.devze.com 2023-04-02 06:03 出处:网络
I\'m facing a tough problem right now regarding the simplest thing: a Button. I have a big application where i need multitouch capabilities embedded in a custom joypad-like interface. For this interf

I'm facing a tough problem right now regarding the simplest thing: a Button.

I have a big application where i need multitouch capabilities embedded in a custom joypad-like interface. For this interface i have a custom joystick and buttons. The problem is this buttons receive the touch event but don't give the usual visual feedback (changing color while touched). These buttons are simple extensions of the base Button class.

Any ideas on why this happens? I'm doing the event separation myself for multitouch but this isn't the issue as the Buttons receive the event as expected.

I开发者_如何学Cf code needed, comment please.

Thanks in advance, JQCorreia


You need to create and use custom StateListDrawables for your buttons.

0

精彩评论

暂无评论...
验证码 换一张
取 消