[android-developers] Re: how to call an Activity method from another java file

2009-10-30 Thread Dilli
You can implement some listener concept write a interface in your normal java file and implement that method in activity then by calling that method in the normal java file you can make a call to implemented method in activity class Use handlers to do any Operations in the activity ( in impleme

[android-developers] Re: how to call an Activity method from another java file

2009-10-30 Thread Stefan
Thanks a lot. That was the error :) Now it works. Regards, Stefan On Oct 30, 1:48 pm, Mark Murphy wrote: > Stefan wrote: > > thanks for your answer. i try option 1 today, but i couldnt call the > > funtion in my MainActivity class: > > > My steps: > > > in MainActivity: > > xmlHandler = new XML

[android-developers] Re: how to call an Activity method from another java file

2009-10-30 Thread Mark Murphy
Stefan wrote: > thanks for your answer. i try option 1 today, but i couldnt call the > funtion in my MainActivity class: > > My steps: > > in MainActivity: > xmlHandler = new XMLHandler ( MainActivity.this ); // <-- is that the > Activity, i think so ?? > > in XMLHandler (normal java file): >

[android-developers] Re: how to call an Activity method from another java file

2009-10-30 Thread Stefan
Hi, thanks for your answer. i try option 1 today, but i couldnt call the funtion in my MainActivity class: My steps: in MainActivity: xmlHandler = new XMLHandler ( MainActivity.this ); // <-- is that the Activity, i think so ?? in XMLHandler (normal java file): Activity main; public XMLHandle

[android-developers] Re: how to call an Activity method from another java file

2009-10-30 Thread Mark Murphy
Stefan wrote: > i have following problem: > I have my "MainActivity". In this Activity, i start a thread > (SaxParser in another "normal" java file). Now I want to call a method > from the MainActivity out of the normal java file? Option #1: Pass the Activity in the constructor of your object fr