Wow! You are good. That is where I started from.

On Jan 11, 7:24 pm, Kristopher Micinski <krismicin...@gmail.com>
wrote:
> http://stackoverflow.com/questions/5203547/draw-surfaceview-from-layo...
>
> ??
>
> On Wed, Jan 11, 2012 at 9:18 PM, JamesColeman
>
>
>
>
>
>
>
> <jamescole...@radicalphotography.com> wrote:
> > Thank you for your reply!!
>
> > I am not sure what doesn't make sense.  I was told from a developers
> > forum that  I HAVE to use the xml file and extend surfaceview to
> > accomplish my goals. So that is what I did.  It works, all I need to
> > do now is call a method.
>
> > The DrawingSurfaceView is created from the xml file, not my code, so I
> > don't know how to format a call to mymethod.
>
> > If it wasn't created from the xml file there are a couple of ways for
> > me to call mymethod. For example if I create the class from where I
> > want to make the call I can do the following.
>
> > DrawingSurfaceView MyView - new DrawingSurfaceView();
> > MyView.myMethod();
>
> > However, I never create the MyView. It is created form the xlm file.
>
> > I  do not think basic android questions involve xml layout files.
>
> > On Jan 11, 6:56 pm, Kristopher Micinski <krismicin...@gmail.com>
> > wrote:
> >> It doesn't make any sense to do this, unless you actually have an
> >> object of that class.  Unless the method should indeed be static.
> >> (This seems like a basic Java question, not an Android specific
> >> question.)
>
> >> Kris
>
> >> On Wed, Jan 11, 2012 at 8:51 PM, JamesColeman
>
> >> <jamescole...@radicalphotography.com> wrote:
> >> > In my xml layout file I override surface view as follows
>
> >> > my.xlm
> >> > <com.MyApp.DrawingSurfaceView
> >> >        android:id="@+id/DrawingSurfaceView"
> >> >        android:layout_width="fill_parent"
> >> >        android:layout_height="fill_parent"
> >> >        android:layout_weight="1" />
>
> >> > DrawingSurfaceView.java
> >> > public class DrawingSurfaceView extends SurfaceView implements
> >> > SurfaceHolder.Callback{
>
> >> > public void myMethod(){
> >> > }
> >> > }
>
> >> > How do I call MyMethod from another class?
>
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups "Android Developers" group.
> >> > To post to this group, send email to android-developers@googlegroups.com
> >> > To unsubscribe from this group, send email to
> >> > android-developers+unsubscr...@googlegroups.com
> >> > For more options, visit this group at
> >> >http://groups.google.com/group/android-developers?hl=en
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to