Basically I would like to draw from myView class and not from the main
Activity, right now I have the OnTouch events in the main Activity as
you can see, I want to move all that code (The ontiuch) to myView
class.
On Apr 21, 5:56 pm, TreKing wrote:
> On Wed, Apr 20, 2011 at 10:38 PM, edprog wro
I understand java, inheritance, creating classes... I am just having
trouble making it work on Android, when i add a thread or something..
it blacks out the screen...
Thank you for the help
On Apr 22, 12:02 am, TreKing wrote:
> On Thu, Apr 21, 2011 at 8:47 PM, edprog wrote:
> > Basically I woul
Yes I did thank you, no its ok.. I am new in graphs that i can tell
you... all this is new.. drawing and stuff.
I know what you are saying.. to create something like
public class myView extends View implements OnTouchListener{}
I think,... and yes it is a mess because in the main Activity is whe
No not offended, thank you very much for the input.. it really helped,
but now i need to figure out how to make the images swap on their own
when the system is playing ("I am trying to do simon says") for my
son :)
Here is the improved code
public class GameActivity extends Activity {
/*
I think eventually i will need help hehe, as of now I will try to do
it see if I can figure it out. Now just one question do you recommend
to create the Thread in the main Activity or do it in a separate
class?
On Apr 22, 11:32 am, TreKing wrote:
> On Fri, Apr 22, 2011 at 2:10 AM, edprog wrote:
On Thu, Apr 21, 2011 at 8:47 PM, edprog wrote:
> Basically I would like to draw from myView class and not from the
> main Activity, right now I have the OnTouch events in the main Activity
> as you can see, I want to move all that code (The ontiuch) to myView class.
>
You're missing the fact tha
On Thu, Apr 21, 2011 at 11:46 PM, edprog wrote:
> I understand java, inheritance, creating classes...
>
If you say so. No offense, but the fact that you called your own code "a
mess" and the fact that you copied and pasted the exact same code 4 times
instead of making a class would indicate that
On Fri, Apr 22, 2011 at 12:30 AM, edprog wrote:
> public class myView extends View implements OnTouchListener{}
>
Sure. Or a member in the Activity that you then set on the ImageViews.
private mTouchListener = new OnTouchListener() { /* CODE */ }
...
imageView1.setOnTouchListener(mTouchListene
On Fri, Apr 22, 2011 at 2:10 AM, edprog wrote:
> but now i need to figure out how to make the images swap on their own when
> the system is playing
>
Did you need help on that or are you just typing out loud?
--
On Fri, Apr 22, 2011 at 2:42 PM, edprog wrote:
> Now just one question do you recommend to create the Thread in the main
> Activity or do it in a separate class?
>
Actually, neither. Don't use raw Threads unless you really have to. I don't
think you really have to here.
See this article:
http:/
10 matches
Mail list logo