java - Does it save more memory and is it more efficient to reuse recyclerviews? -
i have total of 4 recyclerviews, each has own xml recyclerview, better on memory usage have 4 fragments use 1 xml recyclerview or each have own recyclerview? if change have substantial effect on amount of allocated files in heap?
a few things point out here:
- every fragment has unique view hierarchy. if want 4 fragments have recycler view, should declare in each fragment. if reuse save xml defined view between fragments, different instance of recycler view still created each fragment.
- there no such thing xml recycler view. xml used markup language specify view hierarchy. in end, views java objects.
- files not allocated on heap. objects are.
Comments
Post a Comment