xml - Android programatically create UI based on dynamic data -
xml - Android programatically create UI based on dynamic data -
there many questions here in regarding programmatically creating ui in android, question best approach efficiently display dynamic data.
requirement: want display text info sqlite
database , display proper formatting. ie, title different color rest of text, different background color/drawable part of text , on..there many rows of info , each row of text might having different number of title,subtitle, body etc.. , size of text stored pretty large.
problem: 1. if create ui in xml each text have create separate layout number amount of text stored in database high approach won't work. 2. if store info html in database , display in textview
basic formatting can applied.
my current approach: store info in sqlite
in form of xml
proper tags distinguish title,subtitle, body etc.. parse xml
info , create views programmatically each tag proper formatting. approach can display number of rows of info database single piece of code creates ui.
is there approach improve this? please share suggestions.
android xml
Comments
Post a Comment