Click Event Not Working

23 views
Skip to first unread message

Christopher Burner

unread,
Nov 6, 2014, 8:10:44 PM11/6/14
to alternate-java-bridg...@googlegroups.com
I realize this is an old project, most likely abandoned, but if anyone is out there, I need some input.

I can not get a button to work with the simplest examples. The screen initialize event happens and everything works peachy with that event. Anything that has to do with buttons and canvas I can not get to work. I can't even get the Paint Pot example to work. The screen loads but no activity with the buttons or canvas. The java files is attached.

Any help at all would be appreciated.

Chris
PaintPot.java

Steve Marcus

unread,
Nov 7, 2014, 5:31:22 PM11/7/14
to alternate-java-bridg...@googlegroups.com
Uncomment this line in your code: setContentView(R.layout.paintpot); 

(Make sure you have paintpot.xml file in your res/layout folder)

MotionEvent needs a ContentView to work. At the moment the problem is OnTouchEvent never occurs so MotionEvent is always null.
 


Christopher Burner

unread,
Nov 7, 2014, 5:55:46 PM11/7/14
to alternate-java-bridg...@googlegroups.com
I will give it a try. I designed another app with GLE and never got the buttons to work. I will go over my code again and see what I can come up with. The app I am working on is a rewrite of https://play.google.com/store/apps/details?id=christopherburner.Android_Diver so I can add admob.
Reply all
Reply to author
Forward
0 new messages