aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/src/main/res
diff options
context:
space:
mode:
authorEric Kuck <eric@bluelinelabs.com>2018-07-06 16:02:48 -0500
committerJason A. Donenfeld <Jason@zx2c4.com>2018-07-08 02:50:49 +0200
commit69911499e69b7abc7e93678063a2b1c75a052c48 (patch)
tree70a2f5394e65f4becccab279ccf4e86b1a426fcf /app/src/main/res
parentAnother bump for misbuild (diff)
downloadwireguard-android-69911499e69b7abc7e93678063a2b1c75a052c48.tar.xz
wireguard-android-69911499e69b7abc7e93678063a2b1c75a052c48.zip
Switch from ListView to RecyclerView
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/drawable/list_item_background_anim.xml1
-rw-r--r--app/src/main/res/layout/tunnel_list_fragment.xml9
2 files changed, 8 insertions, 2 deletions
diff --git a/app/src/main/res/drawable/list_item_background_anim.xml b/app/src/main/res/drawable/list_item_background_anim.xml
index 98bfded9..213130c7 100644
--- a/app/src/main/res/drawable/list_item_background_anim.xml
+++ b/app/src/main/res/drawable/list_item_background_anim.xml
@@ -2,4 +2,5 @@
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/list_item_ripple"> <!-- TODO(msf): themeify this -->
<item android:drawable="@drawable/list_item_background" />
+ <item android:id="@android:id/mask" android:drawable="@android:color/white" />
</ripple>
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&lt;String, Tunnel&gt;" />
</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"