android - Is it possible to sort data in a textview? -
i using 'codeofaninja' . android table scroll code
he generates data. replaced sqlite database. works but... need sort , displays textviews tablerows. should use listviews instead of textviews/tablerows? have seen examples of data being sorted in collection. have data in lists have read textviews have performance problems. if answer listviews have redesign views trying not do. if technology says must it. have come 2 options: 1:textview gets repopulated list after data actions. 2:listview data manipulated stored db. need put listview in relativelayout view?
i have tried deleting tablerows textview , reading data in proves slow.
i searched on textviews , listviews , have seen many examples still not clear method preferred. thank input.
the idea sorting independent of view. sort data in collection (list, array, etc.) first, use listadapter (or arrayadapter, .etc) populate view.
from described, seems textviews re-created every time, i.e, if have 10 rows, each row has 3 textviews, did create 30 textviews? in case, sure has performance problem. try reading on viewholder listview android viewholder implementation
Comments
Post a Comment