[Q] Question about tapatalk api (xda app): how can I parse the bbcode of the posts?

rastanthology

Senior Member
Oct 18, 2010
73
2
28
Hello, I'm developing an application that uses tapatalk xmlrpc api to get the content of some forums. I've just reached the point where the user gets to the posts and I stumbled with this particular problem.

I get the text of each post and put it on a textview. After that I put it in a textview on a list. The text contains the BBCode of the forum. By this I mean it contains text such as "[URL...", quotes, etc. I want to do as it is done on xda app; there if there is a link it is displayed as a link and it can be clicked, if there is a quote it is displayed as a quote.

I was hoping to get some guidelines on how to achieve this. I haven't worked with BBCode before. All I could think of is parsing the text with string attributes such as .contains, .split, etc. And even if I do that and separate everything then I have to join everything back again, put clicklisteners on different parts of the text, etc; and for now I'm clueless on how to achieve that. But I think there should be an easier way and, since that is solved on the xda app, I was hoping that someone here gets me in the right direction.


Thanks in advance!