diff --git a/.idea/misc.xml b/.idea/misc.xml
index fbb68289f4..5d19981032 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -37,7 +37,7 @@
-
+
diff --git a/wear/build.gradle b/wear/build.gradle
index 53251f7db6..1b546ec267 100644
--- a/wear/build.gradle
+++ b/wear/build.gradle
@@ -34,10 +34,21 @@ android {
}
}
+allprojects {
+ repositories {
+ jcenter()
+ flatDir {
+ dirs 'libs'
+ }
+ }
+}
+
+
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
- compile 'com.ustwo.android:clockwise-wearable:1.0.2'
- compile 'com.google.android.support:wearable:1.1.0'
+ //compile 'com.ustwo.android:clockwise-wearable:1.0.2'
+ compile 'com.google.android.support:wearable:1.4.0'
compile 'com.google.android.gms:play-services-wearable:7.3.0'
compile files('libs/hellocharts-library-1.5.5.jar')
+ compile(name:'ustwo-clockwise-debug', ext:'aar')
}
diff --git a/wear/src/main/java/info/nightscout/androidaps/BIGChart.java b/wear/src/main/java/info/nightscout/androidaps/BIGChart.java
index 64d125115e..7aa00d2d79 100644
--- a/wear/src/main/java/info/nightscout/androidaps/BIGChart.java
+++ b/wear/src/main/java/info/nightscout/androidaps/BIGChart.java
@@ -18,6 +18,7 @@ import android.os.PowerManager;
import android.preference.PreferenceManager;
import android.support.v4.content.LocalBroadcastManager;
import android.support.wearable.view.WatchViewStub;
+import android.support.wearable.watchface.WatchFaceStyle;
import android.text.format.DateFormat;
import android.util.Log;
import android.view.Display;
@@ -29,10 +30,11 @@ import android.widget.RelativeLayout;
import android.widget.TextView;
import com.google.android.gms.wearable.DataMap;
-import com.ustwo.clockwise.WatchFace;
-import com.ustwo.clockwise.WatchFaceTime;
-import com.ustwo.clockwise.WatchMode;
-import com.ustwo.clockwise.WatchShape;
+import com.ustwo.clockwise.wearable.WatchFace;
+import com.ustwo.clockwise.common.WatchFaceTime;
+import com.ustwo.clockwise.common.WatchMode;
+import com.ustwo.clockwise.common.WatchShape;
+import com.ustwo.clockwise.common.util.Logr;
import java.util.ArrayList;
import java.util.Date;
@@ -135,6 +137,19 @@ public class BIGChart extends WatchFace implements SharedPreferences.OnSharedPre
wakeLock.acquire(50);
}
+ @Override
+ protected void onTapCommand(int tapType, int x, int y, long eventTime) {
+ statusView.setText("x:" + x +" y:" + y + " t:" + tapType);
+ invalidate();
+ }
+
+ @Override
+ protected WatchFaceStyle getWatchFaceStyle(){
+ return new WatchFaceStyle.Builder(this).setAcceptsTapEvents(true).build();
+ }
+
+
+
public int ageLevel() {
if(timeSince() <= (1000 * 60 * 12)) {
return 1;
diff --git a/wear/src/main/java/info/nightscout/androidaps/BaseWatchFace.java b/wear/src/main/java/info/nightscout/androidaps/BaseWatchFace.java
index cf64467a4e..06891d8d5f 100644
--- a/wear/src/main/java/info/nightscout/androidaps/BaseWatchFace.java
+++ b/wear/src/main/java/info/nightscout/androidaps/BaseWatchFace.java
@@ -26,9 +26,9 @@ import android.widget.RelativeLayout;
import android.widget.TextView;
import com.google.android.gms.wearable.DataMap;
-import com.ustwo.clockwise.WatchFace;
-import com.ustwo.clockwise.WatchFaceTime;
-import com.ustwo.clockwise.WatchShape;
+import com.ustwo.clockwise.wearable.WatchFace;
+import com.ustwo.clockwise.common.WatchFaceTime;
+import com.ustwo.clockwise.common.WatchShape;
import java.util.ArrayList;
import java.util.Date;
diff --git a/wear/src/main/java/info/nightscout/androidaps/CircleWatchface.java b/wear/src/main/java/info/nightscout/androidaps/CircleWatchface.java
index f59647d218..c81b6de6f1 100644
--- a/wear/src/main/java/info/nightscout/androidaps/CircleWatchface.java
+++ b/wear/src/main/java/info/nightscout/androidaps/CircleWatchface.java
@@ -26,8 +26,8 @@ import android.view.WindowManager;
import android.widget.TextView;
import com.google.android.gms.wearable.DataMap;
-import com.ustwo.clockwise.WatchFace;
-import com.ustwo.clockwise.WatchFaceTime;
+import com.ustwo.clockwise.wearable.WatchFace;
+import com.ustwo.clockwise.common.WatchFaceTime;
import java.util.ArrayList;
import java.util.Calendar;
diff --git a/wear/src/main/java/info/nightscout/androidaps/Home.java b/wear/src/main/java/info/nightscout/androidaps/Home.java
index c600326235..ba157b82e1 100644
--- a/wear/src/main/java/info/nightscout/androidaps/Home.java
+++ b/wear/src/main/java/info/nightscout/androidaps/Home.java
@@ -3,10 +3,12 @@ package info.nightscout.androidaps;
import android.graphics.Color;
import android.view.LayoutInflater;
-import com.ustwo.clockwise.WatchMode;
+import com.ustwo.clockwise.common.WatchMode;
import lecho.lib.hellocharts.util.ChartUtils;
+import static android.content.Context.LAYOUT_INFLATER_SERVICE;
+
public class Home extends BaseWatchFace {
@Override
diff --git a/wear/src/main/java/info/nightscout/androidaps/LargeHome.java b/wear/src/main/java/info/nightscout/androidaps/LargeHome.java
index 59fb4a11e7..da9cf19a51 100644
--- a/wear/src/main/java/info/nightscout/androidaps/LargeHome.java
+++ b/wear/src/main/java/info/nightscout/androidaps/LargeHome.java
@@ -3,7 +3,7 @@ package info.nightscout.androidaps;
import android.graphics.Color;
import android.view.LayoutInflater;
-import com.ustwo.clockwise.WatchMode;
+import com.ustwo.clockwise.common.WatchMode;
public class LargeHome extends BaseWatchFace {
diff --git a/wear/wear.iml b/wear/wear.iml
index 0d2683ce42..13caf1cb90 100644
--- a/wear/wear.iml
+++ b/wear/wear.iml
@@ -43,6 +43,13 @@
+
+
+
+
+
+
+
@@ -51,13 +58,6 @@
-
-
-
-
-
-
-
@@ -126,12 +126,12 @@
-
-
+
+
-
-
+
+
@@ -147,13 +147,13 @@
+
+
-
+
+
-
-
-
-
+
\ No newline at end of file