From 776434e5f1573470245989482b793115f2491e85 Mon Sep 17 00:00:00 2001 From: raphael Date: Sun, 18 Mar 2018 15:46:36 +0200 Subject: [PATCH] display rssi and signal level, sort by rssi --- btscanselector/build.gradle | 4 ++-- .../btscanselector/BTScanSelectorBuilder.java | 1 - .../phearme/btscanselector/DataBindingAdapters.java | 12 ++++++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 btscanselector/src/main/java/com/phearme/btscanselector/DataBindingAdapters.java diff --git a/btscanselector/build.gradle b/btscanselector/build.gradle index 0f1ef5c..7deb716 100644 --- a/btscanselector/build.gradle +++ b/btscanselector/build.gradle @@ -7,8 +7,8 @@ android { defaultConfig { minSdkVersion 14 targetSdkVersion 26 - versionCode 10 - versionName "1.0.9" + versionCode 11 + versionName "1.0.10" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" diff --git a/btscanselector/src/main/java/com/phearme/btscanselector/BTScanSelectorBuilder.java b/btscanselector/src/main/java/com/phearme/btscanselector/BTScanSelectorBuilder.java index 384aae9..298a775 100644 --- a/btscanselector/src/main/java/com/phearme/btscanselector/BTScanSelectorBuilder.java +++ b/btscanselector/src/main/java/com/phearme/btscanselector/BTScanSelectorBuilder.java @@ -6,7 +6,6 @@ public class BTScanSelectorBuilder { public static void build(FragmentActivity activity, ABTScanSelectorEventsHandler handler) { BTScanSelectorDialog dialog = new BTScanSelectorDialog(); - dialog.setCancelable(true); dialog.setEvents(handler); dialog.show(activity.getSupportFragmentManager(), "selectbtdevice"); } diff --git a/btscanselector/src/main/java/com/phearme/btscanselector/DataBindingAdapters.java b/btscanselector/src/main/java/com/phearme/btscanselector/DataBindingAdapters.java new file mode 100644 index 0000000..60b9a97 --- /dev/null +++ b/btscanselector/src/main/java/com/phearme/btscanselector/DataBindingAdapters.java @@ -0,0 +1,12 @@ +package com.phearme.btscanselector; + + +import android.databinding.BindingAdapter; +import android.widget.ImageView; + +public class DataBindingAdapters { + @BindingAdapter("android:src") + public static void setImageResource(ImageView imageView, int resource){ + imageView.setImageResource(resource); + } +}