Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Textview linking to another TextView on same View

 
Mahender Parkipandla
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is clicking on one TextView navigates to another TextView on same View possible? If yes, please suggest how can I do this?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "navigate"? Setting the focus?
 
Mahender Parkipandla
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. Similar to HREF tags in HTML on same page. Can we do that?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So there's a link in the TextView? You can implement the link as an android.text.style.ClickableSpan, and implement any behavior you want in its onClick method.
 
Mahender Parkipandla
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm doing this in below way.



But after setting focus to TextView2, if I scroll up and click on TextView1, it's not working, means, it not setting the focus again. That view need to be loaded again for achieving this functionality.
Can you know why this is happening?

Thanks for reply.
 
Mahender Parkipandla
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And I wanted to mention, I made TextView as clickable. There is no link in TextView.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see anything in the code that would set the focus ... ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic