This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling a method in Another Activity.

 
Gokul Kesavalu
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 632
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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().
 
Gokul Kesavalu
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 632
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For this you can use Linkify.
 
kumar mdu
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try this link

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

thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic