Android : Reusing items in MvxListView

on Monday, October 13, 2014


I'm wondering how MvxAdapter handles viewToUse in GetBindableView. I'm aware that it changes data context of that view but what does it mean? If we have some TextView:



<TextView
android:layout_width="match_parent"
android:layout_height="@dimen/warning_item_height"
local:MvxBind="Text SomeTextProperty; Visibility IsRemoved, Converter=Visibility" />


will context change first determine if IsRemoved property in old item is equal to that in new item ...and possibly avoid using converter? It is maybe irrelevant in this example but it becomes an issue if we are trying to hide some picture. Will it redraw each time?


And if there's no Converter ... if we have just plain MvxImageView ?



<Mvx.MvxImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:scaleType="fitCenter"
local:MvxBind="AssetImagePath SomeImagePath" />


Will it redraw each time?


0 comments:

Post a Comment