diff options
author | Eric Kuck <eric@bluelinelabs.com> | 2018-07-06 16:02:48 -0500 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-08 02:50:49 +0200 |
commit | b37b48b8dc2ad2eb130a002feee84d1a73fad147 (patch) | |
tree | 70a2f5394e65f4becccab279ccf4e86b1a426fcf /app/src/main/res/layout | |
parent | 2c7203ab8d88a1eb497d674110922271ec610374 (diff) |
Switch from ListView to RecyclerView
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/tunnel_list_fragment.xml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/src/main/res/layout/tunnel_list_fragment.xml b/app/src/main/res/layout/tunnel_list_fragment.xml index 29b6fe08..cad2e094 100644 --- a/app/src/main/res/layout/tunnel_list_fragment.xml +++ b/app/src/main/res/layout/tunnel_list_fragment.xml @@ -11,6 +11,10 @@ type="com.wireguard.android.fragment.TunnelListFragment" /> <variable + name="rowConfigurationHandler" + type="com.wireguard.android.databinding.ObservableKeyedRecyclerViewAdapter.RowConfigurationHandler" /> + + <variable name="tunnels" type="com.wireguard.android.util.ObservableKeyedList<String, Tunnel>" /> </data> @@ -21,13 +25,14 @@ android:layout_height="match_parent" android:background="?android:attr/colorBackground"> - <ListView + <android.support.v7.widget.RecyclerView android:id="@+id/tunnel_list" android:layout_width="match_parent" android:layout_height="match_parent" android:choiceMode="multipleChoiceModal" app:items="@{tunnels}" - app:layout="@{@layout/tunnel_list_item}" /> + app:layout="@{@layout/tunnel_list_item}" + app:configurationHandler="@{rowConfigurationHandler}" /> <com.wireguard.android.widget.fab.FloatingActionsMenu android:id="@+id/create_menu" |