summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java/com/wireguard/android/databinding/BindingAdapters.java
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2018-01-06 04:05:43 -0600
committerSamuel Holland <samuel@sholland.org>2018-01-06 04:09:30 -0600
commit6eef4093d8a545d90c9d007bcc4ff794da6ee7f2 (patch)
treeccbf4eeb4feec31baea876024bc69e2efc96514c /app/src/main/java/com/wireguard/android/databinding/BindingAdapters.java
parentff0bb081a0baa6f6a1666429eec613c1ed811566 (diff)
databinding: Remove unused classes and methods
Signed-off-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'app/src/main/java/com/wireguard/android/databinding/BindingAdapters.java')
-rw-r--r--app/src/main/java/com/wireguard/android/databinding/BindingAdapters.java27
1 files changed, 0 insertions, 27 deletions
diff --git a/app/src/main/java/com/wireguard/android/databinding/BindingAdapters.java b/app/src/main/java/com/wireguard/android/databinding/BindingAdapters.java
index 121c292b..116b40cb 100644
--- a/app/src/main/java/com/wireguard/android/databinding/BindingAdapters.java
+++ b/app/src/main/java/com/wireguard/android/databinding/BindingAdapters.java
@@ -90,33 +90,6 @@ public final class BindingAdapters {
adapter.setList(newList);
}
- @BindingAdapter({"items", "layout"})
- public static <K extends Comparable<K>, V> void setItems(final ListView view,
- final ObservableNavigableMap<K, V> oldMap,
- final int oldLayoutId,
- final ObservableNavigableMap<K, V> newMap,
- final int newLayoutId) {
- if (oldMap == newMap && oldLayoutId == newLayoutId)
- return;
- // The ListAdapter interface is not generic, so this cannot be checked.
- @SuppressWarnings("unchecked")
- ObservableMapAdapter<K, V> adapter = (ObservableMapAdapter<K, V>) view.getAdapter();
- // If the layout changes, any existing adapter must be replaced.
- if (adapter != null && oldMap != null && oldLayoutId != newLayoutId) {
- adapter.setMap(null);
- adapter = null;
- }
- // Avoid setting an adapter when there is no new list or layout.
- if (newMap == null || newLayoutId == 0)
- return;
- if (adapter == null) {
- adapter = new ObservableMapAdapter<>(view.getContext(), newLayoutId, newMap);
- view.setAdapter(adapter);
- }
- // Either the list changed, or this is an entirely new listener because the layout changed.
- adapter.setMap(newMap);
- }
-
@BindingAdapter({"onBeforeCheckedChanged"})
public static void setOnBeforeCheckedChanged(final ToggleSwitch view,
final ToggleSwitch.OnBeforeCheckedChangeListener