0

As mentioned here,we can start Activity by Intent that is created with specific url,when Activity has desired intent filter.So we can start Activity by setting a URLSpan for SpanableString that is set as text for text view,like this:

ss.setSpan(new URLSpan("http:my.Activity"), 13, 17,
                   Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);

When we use an Intent to start Activity,we can add more details as extras to intent and retrieve them in Activity by getExtras method.My question is:

Is there any way to start Activity by URLSpan and also send a String which can be retrieved by target Activity?

Community
  • 1
  • 1
hasanghaforian
  • 13,498
  • 9
  • 73
  • 157

1 Answers1

1

sure, extend URLSpan and override its onClick method

pskink
  • 22,695
  • 6
  • 60
  • 74