[android-beginners] Frame by frame animation issue

2009-05-16 Thread steve_macleod
Hi, I am attempting to animate an ImageView using frame-by-frame animation. I am using the following code: ImageView pacImageV = (ImageView) findViewById(R.id.pacAnim); pacImageV.setBackgroundResource(R.anim.pacanim); pacManCharAnim = (AnimationDrawable) pacImageV.getBackground();

[android-beginners] Re: Frame by frame animation issue

2009-05-16 Thread steve_macleod
this? If so, how should I reference it? Thanks, On May 16, 4:40 pm, steve_macleod steven_macl...@hotmail.com wrote: Hi, I am attempting to animate an ImageView using frame-by-frame animation. I am using the following code: ImageView pacImageV = (ImageView) findViewById(R.id.pacAnim

[android-beginners] Null pointer on setBackgroundResource

2009-04-26 Thread steve_macleod
Hi, I am attempting to animate an ImageView using frame-by-frame animation. I am using the following code: ImageView pacImageV = (ImageView) findViewById(R.id.pacAnim); pacImageV.setBackgroundResource(R.anim.pacanim); pacManCharAnim = (AnimationDrawable) pacImageV.getBackground();

[android-beginners] Re: Basic Thread Question

2009-01-20 Thread steve_macleod
anyone have an idea on this one? thanks On Jan 19, 10:29 am, steve_macleod steven_macl...@hotmail.com wrote: Hi Dave, First - thanks for the reply. Maybe im missing something here, but what is the app's message looper? I am creating the thread with the following line: mPacManThread

[android-beginners] Re: Basic Thread Question

2009-01-19 Thread steve_macleod
for 10 seconds, which is probably not what you want. As an alternative, you can send yourself a delayed message, or you can have your animation thread read the system time when it starts up and exit after the 10 seconds has expired. On Jan 17, 2:55 am, steve_macleod steven_macl...@hotmail.com

[android-beginners] Basic Thread Question

2009-01-17 Thread steve_macleod
Hi, I am writing an application to get a grip of basic sprite animation. I have a surfaceCreated method which looks like this: public void surfaceCreated(SurfaceHolder holder) { mPacManThread.setRunning(true); mPacManThread.start(); //this thread

[android-beginners] drawBitmap not displaying JPG

2009-01-14 Thread steve_macleod
Hi, I am using the code below to attempt to display a bitmap, which will act as the splash screen for a little android pacman game im creating (learning may aswell be fun). The problem is that the JPG file is not being displayed. I can see no reason why this is happening. I've done a toString in

[android-beginners] Re: drawBitmap not displaying JPG

2009-01-14 Thread steve_macleod
, 2009 at 3:05 AM, steve_macleod steven_macl...@hotmail.com wrote: Hi, I am using the code below to attempt to display a bitmap, which will act as the splash screen for a little android pacman game im creating (learning may aswell be fun). The problem is that the JPG file is not being

[android-beginners] Re: drawBitmap not displaying JPG

2009-01-14 Thread steve_macleod
mSurfaceHolder.unlockCanvasAndPost(c); Did the trick! Thanks for that On Jan 14, 8:58 pm, Romain Guy romain...@google.com wrote: After you're done drawing on the Canvas, you need to post and unlock it. On Wed, Jan 14, 2009 at 12:56 PM, steve_macleod steven_macl...@hotmail.com wrote

[android-beginners] Re: Error on setText

2009-01-13 Thread steve_macleod
SIG: 9 01-13 21:09:33.475: INFO/ActivityManager(51): Process com.android.hello (pid 429) has died. 01-13 21:09:33.527: INFO/WindowManager(51): WIN DEATH: Window{4345a460 com.android.hello/com.android.hello.HelloAndroid} On Jan 12, 2:13 pm, Mark Murphy mmur...@commonsware.com wrote: steve_macleod

[android-beginners] Re: Error on setText

2009-01-13 Thread steve_macleod
Just found it. Looks like I was using the old ID notation in the layout xml. I had id=@+id/entry when I needed android:id=@+id/entry On Jan 13, 9:43 pm, steve_macleod steven_macl...@hotmail.com wrote: It looks like mTa.setText(mTxt); is generating the NullPointerException because

[android-beginners] Re: Assistance with understanding LunarLander code

2008-12-13 Thread steve_macleod
in a member variable. The constructor for LunarView created a private LunarThread object so doing: mLunarThread = mLunarView.getThread() enables us to retrieve a reference to the thread object. Hope that's correct and helpful! richard. On 12 Dec, 15:49, steve_macleod steven_macl

[android-beginners] Re: Assistance with understanding LunarLander code

2008-12-13 Thread steve_macleod
Cheers, that makes sense. I didnt notice the reference to the class in the lunar_layour xml. On Dec 13, 3:58 pm, Mark Murphy mmur...@commonsware.com wrote: RichardS wrote: Steve, I'm sure the instance is created by setContentView(R.layout.lunar_layout) so the constructor will have been

[android-beginners] Assistance with understanding LunarLander code

2008-12-12 Thread steve_macleod
Hi, I have been working through the lunarlander example application, in an attempt to understand the source code. I have run into a couple of problems, and would really appreciate if someone could space a couple of minutes to assist in may understanding. The onCreate method contains the

[android-beginners] onStart argiment change

2008-11-25 Thread steve_macleod
Hi, I am attempting to get the following service to work, and running into problems. Seemingly the onStart function has updated parameters. It is now expecting the Intent and an integer. How do I get the intent to pass in to the function? thanks package com.stevemacleod.prankapp; import