aspose file tools*
The moose likes Android and the fly likes Calling a method in Another Activity. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Calling a method in Another Activity." Watch "Calling a method in Another Activity." New topic
Author

Calling a method in Another Activity.

Gokul Kesavalu
Greenhorn

Joined: Jan 08, 2008
Posts: 20
Hi Folks. I am a newbie to Android development. My requirement is mentioned below.

I am having a Purchase order number.

I need to make the Purchase Order number as a Link.

If i click that Purchase Order number, it must goto another Activity which displays it full details by calling a method in that Activity by passing the Purchase order number as parameter.

Please help me to fix this..


Thanks in advance

Gokul.K

Pramod P Deore
Ranch Hand

Joined: Jul 15, 2008
Posts: 629

To call another activity you can use intent as

Intent explicitIntent = new Intent(InvokingActivity.this,InvokedActivity.class);
startActivity(explicitIntent);

This will call InvokedActivity from your current activity (i.e from InvokingActivity)

If you want a result to be returned by the child activity, you need to call it by the method startActivityForResult().

Life is easy because we write the source code.....
Gokul Kesavalu
Greenhorn

Joined: Jan 08, 2008
Posts: 20
hi Pramod. thanks for the reply. But i want to call the activity by using a link. How to create a link and then how to call an Activity using that. I know about Intents. Basically i will use Intents on Button clicks. But i want how to create a link and how to add intent to that. Can you explain me in detail. Thanks in advance.
Pramod P Deore
Ranch Hand

Joined: Jul 15, 2008
Posts: 629

For this you can use Linkify.
kumar mdu
Ranch Hand

Joined: Jan 04, 2011
Posts: 59
try this link

http://android-er.blogspot.com/2010/07/linkify.html

thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Calling a method in Another Activity.