Merge pull request #14 from rICTx-T1D/rICTx-T1D_watchface01
New styled watchface with multiple colored styles for round and rect watches
|
@ -128,7 +128,7 @@ android {
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
versionCode 1500
|
versionCode 1500
|
||||||
version "2.7.0-dev"
|
version "2.7.0"
|
||||||
buildConfigField "String", "VERSION", '"' + version + '"'
|
buildConfigField "String", "VERSION", '"' + version + '"'
|
||||||
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
|
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
|
||||||
buildConfigField "String", "REMOTE", '"' + generateGitRemote() + '"'
|
buildConfigField "String", "REMOTE", '"' + generateGitRemote() + '"'
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.service.wallpaper.WallpaperService" />
|
<action android:name="android.service.wallpaper.WallpaperService" />
|
||||||
|
|
||||||
<category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
|
<category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
|
@ -52,7 +51,6 @@
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.service.wallpaper.WallpaperService" />
|
<action android:name="android.service.wallpaper.WallpaperService" />
|
||||||
|
|
||||||
<category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
|
<category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
|
@ -71,7 +69,6 @@
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.service.wallpaper.WallpaperService" />
|
<action android:name="android.service.wallpaper.WallpaperService" />
|
||||||
|
|
||||||
<category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
|
<category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
|
@ -90,7 +87,6 @@
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.service.wallpaper.WallpaperService" />
|
<action android:name="android.service.wallpaper.WallpaperService" />
|
||||||
|
|
||||||
<category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
|
<category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
|
@ -109,7 +105,6 @@
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.service.wallpaper.WallpaperService" />
|
<action android:name="android.service.wallpaper.WallpaperService" />
|
||||||
|
|
||||||
<category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
|
<category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
|
@ -128,7 +123,6 @@
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.service.wallpaper.WallpaperService" />
|
<action android:name="android.service.wallpaper.WallpaperService" />
|
||||||
|
|
||||||
<category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
|
<category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
|
@ -147,7 +141,6 @@
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.service.wallpaper.WallpaperService" />
|
<action android:name="android.service.wallpaper.WallpaperService" />
|
||||||
|
|
||||||
<category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
|
<category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
|
@ -165,7 +158,27 @@
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.service.wallpaper.WallpaperService" />
|
<action android:name="android.service.wallpaper.WallpaperService" />
|
||||||
|
<category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
|
||||||
|
</intent-filter>
|
||||||
|
</service>
|
||||||
|
|
||||||
|
<service
|
||||||
|
android:name=".watchfaces.DigitalStyle"
|
||||||
|
android:allowEmbedded="true"
|
||||||
|
android:label="@string/label_digitalstyle"
|
||||||
|
android:permission="android.permission.BIND_WALLPAPER">
|
||||||
|
<meta-data
|
||||||
|
android:name="android.service.wallpaper"
|
||||||
|
android:resource="@xml/watch_face" />
|
||||||
|
<meta-data
|
||||||
|
android:name="com.google.android.wearable.watchface.preview"
|
||||||
|
android:resource="@drawable/watchface_digitalstyle" />
|
||||||
|
<meta-data
|
||||||
|
android:name="com.google.android.wearable.watchface.wearableConfigurationAction"
|
||||||
|
android:value="info.nightscout.androidaps.interaction.configurationActivities.DigitalStyleConfigAct" />
|
||||||
|
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.service.wallpaper.WallpaperService" />
|
||||||
<category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
|
<category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
|
@ -178,57 +191,57 @@
|
||||||
<action android:name="com.google.android.gms.wearable.DATA_CHANGED" />
|
<action android:name="com.google.android.gms.wearable.DATA_CHANGED" />
|
||||||
|
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/nightscout_watch_data" />
|
android:pathPrefix="/nightscout_watch_data"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/nightscout_watch_data_resend" />
|
android:pathPrefix="/nightscout_watch_data_resend"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/nightscout_watch_cancel_bolus" />
|
android:pathPrefix="/nightscout_watch_cancel_bolus"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/nightscout_watch_confirmactionstring" />
|
android:pathPrefix="/nightscout_watch_confirmactionstring"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/nightscout_watch_initiateactionstring" />
|
android:pathPrefix="/nightscout_watch_initiateactionstring"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/openwearsettings" />
|
android:pathPrefix="/openwearsettings"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/sendstatustowear" />
|
android:pathPrefix="/sendstatustowear"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/sendpreferencestowear" />
|
android:pathPrefix="/sendpreferencestowear"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/nightscout_watch_basal" />
|
android:pathPrefix="/nightscout_watch_basal"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/nightscout_watch_bolusprogress" />
|
android:pathPrefix="/nightscout_watch_bolusprogress"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/nightscout_watch_actionconfirmationrequest" />
|
android:pathPrefix="/nightscout_watch_actionconfirmationrequest"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/nightscout_watch_changeconfirmationrequest" />
|
android:pathPrefix="/nightscout_watch_changeconfirmationrequest"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/nightscout_watch_cancelnotificationrequest" />
|
android:pathPrefix="/nightscout_watch_cancelnotificationrequest"
|
||||||
|
android:scheme="wear" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
|
@ -465,44 +478,42 @@
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".interaction.AAPSPreferences"
|
android:name=".interaction.AAPSPreferences"
|
||||||
android:label="@string/menu_settings">
|
android:label="@string/menu_settings" />
|
||||||
</activity>
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".interaction.actions.WizardActivity"
|
android:name=".interaction.actions.WizardActivity"
|
||||||
android:label="@string/menu_wizard">
|
android:label="@string/menu_wizard" />
|
||||||
</activity>
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".interaction.menus.FillMenuActivity"
|
android:name=".interaction.menus.FillMenuActivity"
|
||||||
android:label="@string/menu_prime_fill">
|
android:label="@string/menu_prime_fill" />
|
||||||
</activity>
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".interaction.menus.StatusMenuActivity"
|
android:name=".interaction.menus.StatusMenuActivity"
|
||||||
android:label="@string/menu_status">
|
android:label="@string/menu_status" />
|
||||||
</activity>
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".interaction.actions.BolusActivity"
|
android:name=".interaction.actions.BolusActivity"
|
||||||
android:label="@string/action_bolus">
|
android:label="@string/action_bolus" />
|
||||||
</activity>
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".interaction.actions.CPPActivity"
|
android:name=".interaction.actions.CPPActivity"
|
||||||
android:label="@string/status_cpp">
|
android:label="@string/status_cpp" />
|
||||||
</activity>
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".interaction.actions.AcceptActivity"
|
android:name=".interaction.actions.AcceptActivity"
|
||||||
android:launchMode="singleInstance"
|
android:label="@string/action_confirm"
|
||||||
android:label="@string/action_confirm">
|
android:launchMode="singleInstance" />
|
||||||
</activity>
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".interaction.actions.FillActivity"
|
android:name=".interaction.actions.FillActivity"
|
||||||
android:label="@string/menu_prime_fill">
|
android:label="@string/menu_prime_fill" />
|
||||||
</activity>
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".interaction.actions.ECarbActivity"
|
android:name=".interaction.actions.ECarbActivity"
|
||||||
android:label="@string/action_carbs">
|
android:label="@string/action_carbs" />
|
||||||
</activity>
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".interaction.actions.TempTargetActivity"
|
android:name=".interaction.actions.TempTargetActivity"
|
||||||
android:label="@string/menu_tempt">
|
android:label="@string/menu_tempt" />
|
||||||
|
<activity android:name=".interaction.configurationActivities.DigitalStyleConfigAct">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="info.nightscout.androidaps.interaction.configurationActivities.DigitalStyleConfigAct" />
|
||||||
|
|
||||||
|
<category android:name="com.google.android.wearable.watchface.category.WEARABLE_CONFIGURATION" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
</application>
|
</application>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
package info.nightscout.androidaps.interaction.configurationActivities;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.R;
|
||||||
|
import preference.WearPreferenceActivity;
|
||||||
|
|
||||||
|
public class DigitalStyleConfigAct extends WearPreferenceActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setTitle("watchface");
|
||||||
|
addPreferencesFromResource(R.xml.watch_face_digitalstyle_configuration);
|
||||||
|
ViewGroup view = (ViewGroup) getWindow().getDecorView();
|
||||||
|
removeBackgroundRecursively(view);
|
||||||
|
view.setBackground(getResources().getDrawable(R.drawable.settings_background));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
void removeBackgroundRecursively(View parent) {
|
||||||
|
if (parent instanceof ViewGroup) {
|
||||||
|
ViewGroup group = (ViewGroup) parent;
|
||||||
|
for (int i = 0; i < group.getChildCount(); i++) {
|
||||||
|
removeBackgroundRecursively(group.getChildAt(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
parent.setBackground(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -11,6 +11,7 @@ import android.graphics.Paint;
|
||||||
import android.graphics.Point;
|
import android.graphics.Point;
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.os.PowerManager;
|
import android.os.PowerManager;
|
||||||
|
import android.os.Vibrator;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||||
import android.support.wearable.view.WatchViewStub;
|
import android.support.wearable.view.WatchViewStub;
|
||||||
|
@ -50,7 +51,7 @@ import lecho.lib.hellocharts.view.LineChartView;
|
||||||
public abstract class BaseWatchFace extends WatchFace implements SharedPreferences.OnSharedPreferenceChangeListener {
|
public abstract class BaseWatchFace extends WatchFace implements SharedPreferences.OnSharedPreferenceChangeListener {
|
||||||
public final static IntentFilter INTENT_FILTER;
|
public final static IntentFilter INTENT_FILTER;
|
||||||
public static final long[] vibratePattern = {0,400,300,400,300,400};
|
public static final long[] vibratePattern = {0,400,300,400,300,400};
|
||||||
public TextView mTime, mSgv, mDirection, mTimestamp, mUploaderBattery, mRigBattery, mDelta, mAvgDelta, mStatus, mBasalRate, mIOB1, mIOB2, mCOB1, mCOB2, mBgi, mLoop, mDay, mMonth, isAAPSv2, mHighLight, mLowLight;
|
public TextView mTime, mHour, mMinute,mSgv, mDirection, mTimestamp, mUploaderBattery, mRigBattery, mDelta, mAvgDelta, mStatus, mBasalRate, mIOB1, mIOB2, mCOB1, mCOB2, mBgi, mLoop, mDay, mDayName, mMonth, isAAPSv2, mHighLight, mLowLight;
|
||||||
public ImageView mGlucoseDial, mDeltaGauge, mHourHand, mMinuteHand;
|
public ImageView mGlucoseDial, mDeltaGauge, mHourHand, mMinuteHand;
|
||||||
public RelativeLayout mRelativeLayout;
|
public RelativeLayout mRelativeLayout;
|
||||||
public LinearLayout mLinearLayout, mLinearLayout2, mDate, mChartTap, mMainMenuTap;
|
public LinearLayout mLinearLayout, mLinearLayout2, mDate, mChartTap, mMainMenuTap;
|
||||||
|
@ -126,7 +127,10 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferen
|
||||||
@Override
|
@Override
|
||||||
public void onLayoutInflated(WatchViewStub stub) {
|
public void onLayoutInflated(WatchViewStub stub) {
|
||||||
mTime = (TextView) stub.findViewById(R.id.watch_time);
|
mTime = (TextView) stub.findViewById(R.id.watch_time);
|
||||||
|
mHour = (TextView) stub.findViewById(R.id.hour);
|
||||||
|
mMinute = (TextView) stub.findViewById(R.id.minute);
|
||||||
mDay = (TextView) stub.findViewById(R.id.day);
|
mDay = (TextView) stub.findViewById(R.id.day);
|
||||||
|
mDayName= (TextView) stub.findViewById(R.id.dayname);
|
||||||
mMonth = (TextView) stub.findViewById(R.id.month);
|
mMonth = (TextView) stub.findViewById(R.id.month);
|
||||||
mDate = (LinearLayout) stub.findViewById(R.id.date_time);
|
mDate = (LinearLayout) stub.findViewById(R.id.date_time);
|
||||||
mLoop = (TextView) stub.findViewById(R.id.loop);
|
mLoop = (TextView) stub.findViewById(R.id.loop);
|
||||||
|
@ -230,6 +234,7 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferen
|
||||||
setDataFields();
|
setDataFields();
|
||||||
setColor();
|
setColor();
|
||||||
missedReadingAlert();
|
missedReadingAlert();
|
||||||
|
checkVibrateHourly(oldTime,newTime);
|
||||||
|
|
||||||
mRelativeLayout.measure(specW, specH);
|
mRelativeLayout.measure(specW, specH);
|
||||||
if (forceSquareCanvas) {
|
if (forceSquareCanvas) {
|
||||||
|
@ -241,6 +246,16 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void checkVibrateHourly(WatchFaceTime oldTime, WatchFaceTime newTime){
|
||||||
|
Boolean hourlyVibratePref = sharedPrefs.getBoolean("vibrate_Hourly", false);
|
||||||
|
if (hourlyVibratePref && layoutSet && newTime.hasHourChanged(oldTime)) {
|
||||||
|
Log.i("hourlyVibratePref", "true --> " + newTime.toString());
|
||||||
|
Vibrator vibrator = (Vibrator) getSystemService(VIBRATOR_SERVICE);
|
||||||
|
long[] vibrationPattern = {0, 150, 125, 100};
|
||||||
|
vibrator.vibrate(vibrationPattern, -1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class MessageReceiver extends BroadcastReceiver {
|
public class MessageReceiver extends BroadcastReceiver {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
|
@ -468,8 +483,18 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferen
|
||||||
sHour = sdfHour.format(now);
|
sHour = sdfHour.format(now);
|
||||||
sMinute = sdfMinute.format(now);
|
sMinute = sdfMinute.format(now);
|
||||||
|
|
||||||
|
if (mHour != null && mMinute != null ) {
|
||||||
|
mHour.setText(sHour);
|
||||||
|
mMinute.setText(sMinute);
|
||||||
|
}
|
||||||
|
|
||||||
if (mDate != null && mDay != null && mMonth != null) {
|
if (mDate != null && mDay != null && mMonth != null) {
|
||||||
if (sharedPrefs.getBoolean("show_date", false)) {
|
if (sharedPrefs.getBoolean("show_date", false)) {
|
||||||
|
if (mDayName != null ) {
|
||||||
|
SimpleDateFormat sdfDayName = new SimpleDateFormat("E");
|
||||||
|
mDayName.setText(sdfDayName.format(now));
|
||||||
|
}
|
||||||
|
|
||||||
SimpleDateFormat sdfDay = new SimpleDateFormat("dd");
|
SimpleDateFormat sdfDay = new SimpleDateFormat("dd");
|
||||||
SimpleDateFormat sdfMonth = new SimpleDateFormat("MMM");
|
SimpleDateFormat sdfMonth = new SimpleDateFormat("MMM");
|
||||||
mDay.setText(sdfDay.format(now));
|
mDay.setText(sdfDay.format(now));
|
||||||
|
|
|
@ -0,0 +1,171 @@
|
||||||
|
package info.nightscout.androidaps.watchfaces;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.res.ColorStateList;
|
||||||
|
import android.support.wearable.watchface.WatchFaceStyle;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.R;
|
||||||
|
import info.nightscout.androidaps.interaction.menus.MainMenuActivity;
|
||||||
|
|
||||||
|
public class DigitalStyle extends BaseWatchFace {
|
||||||
|
private static final long TIME_TAP_THRESHOLD = 800;
|
||||||
|
private long chartTapTime = 0;
|
||||||
|
private long sgvTapTime = 0;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
|
||||||
|
layoutView = inflater.inflate(R.layout.activity_digitalstyle, null);
|
||||||
|
performViewSetup();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onTapCommand(int tapType, int x, int y, long eventTime) {
|
||||||
|
//tapType = TAP_TYPE_TAP;
|
||||||
|
Log.d("onTapCommand: DeviceWidth x DeviceHeight /// x , y, TapType >> ", Integer.toString(getWidth()) + " x " + Integer.toString(getHeight()) + " /// " + Integer.toString(x) + " , " + Integer.toString(y) + " , " + Integer.toString(tapType));
|
||||||
|
|
||||||
|
if (tapType == TAP_TYPE_TAP) {
|
||||||
|
if (eventTime - sgvTapTime < TIME_TAP_THRESHOLD) {
|
||||||
|
Intent intent = new Intent(this, MainMenuActivity.class);
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
sgvTapTime = eventTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected WatchFaceStyle getWatchFaceStyle() {
|
||||||
|
return new WatchFaceStyle.Builder(this)
|
||||||
|
.setAcceptsTapEvents(true)
|
||||||
|
.setHideNotificationIndicator(false)
|
||||||
|
.setShowUnreadCountIndicator(true)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setColorDark() {
|
||||||
|
if (rawData.sgvLevel == 1) {
|
||||||
|
mSgv.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_highColor));
|
||||||
|
mDirection.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_highColor));
|
||||||
|
} else if (rawData.sgvLevel == 0) {
|
||||||
|
mSgv.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_midColor));
|
||||||
|
mDirection.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_midColor));
|
||||||
|
} else if (rawData.sgvLevel == -1) {
|
||||||
|
mSgv.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_lowColor));
|
||||||
|
mDirection.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_lowColor));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ageLevel == 1) {
|
||||||
|
mTimestamp.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_midColor));
|
||||||
|
} else {
|
||||||
|
mTimestamp.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_TimestampOld));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rawData.batteryLevel == 1) {
|
||||||
|
mUploaderBattery.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_midColor));
|
||||||
|
} else {
|
||||||
|
mUploaderBattery.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_uploaderBatteryEmpty));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (chart != null) {
|
||||||
|
highColor = ContextCompat.getColor(getApplicationContext(), R.color.dark_highColor);
|
||||||
|
lowColor = ContextCompat.getColor(getApplicationContext(), R.color.dark_lowColor);
|
||||||
|
midColor = ContextCompat.getColor(getApplicationContext(), R.color.dark_midColor);
|
||||||
|
gridColor = ContextCompat.getColor(getApplicationContext(), R.color.dark_gridColor);
|
||||||
|
basalBackgroundColor = ContextCompat.getColor(getApplicationContext(), R.color.basal_dark);
|
||||||
|
basalCenterColor = ContextCompat.getColor(getApplicationContext(), R.color.basal_light);
|
||||||
|
pointSize = 1;
|
||||||
|
setupCharts();
|
||||||
|
setWatchfaceStyle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setWatchfaceStyle(){
|
||||||
|
/* frame styles*/
|
||||||
|
LinearLayout mShapesElements = layoutView.findViewById(R.id.shapes_elements);
|
||||||
|
if (mShapesElements != null) {
|
||||||
|
String displayFormatType = (mShapesElements.getContentDescription().toString().startsWith("round") ? "round" : "rect");
|
||||||
|
String displayStyle=sharedPrefs.getString("digitalstyle_frameStyle", "full");
|
||||||
|
String displayFrameColor=sharedPrefs.getString("digitalstyle_frameColor", "red");
|
||||||
|
String displayFrameColorSaturation=sharedPrefs.getString("digitalstyle_frameColorSaturation", "500");
|
||||||
|
String displayFrameColorOpacity=sharedPrefs.getString("digitalstyle_frameColorOpacity", "1");
|
||||||
|
|
||||||
|
// Load image with shapes
|
||||||
|
String styleDrawableName = "digitalstyle_bg_" + displayStyle + "_" + displayFormatType;
|
||||||
|
try {
|
||||||
|
mShapesElements.setBackground(getResources().getDrawable(getResources().getIdentifier(styleDrawableName, "drawable", getApplicationContext().getPackageName())));
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e("digitalstyle_frameStyle", "RESOURCE NOT FOUND >> " + styleDrawableName);
|
||||||
|
}
|
||||||
|
|
||||||
|
// set background-tint-color
|
||||||
|
if (displayFrameColor.equalsIgnoreCase("multicolor") || displayStyle.equalsIgnoreCase("none")) {
|
||||||
|
mShapesElements.setBackgroundTintList(null);
|
||||||
|
} else {
|
||||||
|
String strColorName =(( displayFrameColor.equals("white") || displayFrameColor.equals("black") )?displayFrameColor:displayFrameColor+"_"+displayFrameColorSaturation);
|
||||||
|
Log.v("digitalstyle_strColorName",strColorName);
|
||||||
|
try {
|
||||||
|
ColorStateList colorStateList = ContextCompat.getColorStateList(getApplicationContext(), getResources().getIdentifier(strColorName, "color", getApplicationContext().getPackageName()));
|
||||||
|
mShapesElements.setBackgroundTintList(colorStateList);
|
||||||
|
} catch (Exception e) {
|
||||||
|
mShapesElements.setBackgroundTintList(null);
|
||||||
|
Log.e("digitalstyle_colorName", "COLOR NOT FOUND >> " + strColorName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// set opacity of shapes
|
||||||
|
mShapesElements.setAlpha(Float.parseFloat(displayFrameColorOpacity));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* optimize font-size --> when date is off then increase font-size of time */
|
||||||
|
Boolean isShowDate = sharedPrefs.getBoolean("show_date", false);
|
||||||
|
if (!isShowDate) {
|
||||||
|
layoutView.findViewById(R.id.date_time).setVisibility(View.GONE);
|
||||||
|
mHour.setTextSize(62);
|
||||||
|
mMinute.setTextSize(40);
|
||||||
|
mHour.setLetterSpacing((float) -0.066);
|
||||||
|
mMinute.setLetterSpacing((float) -0.066);
|
||||||
|
} else {
|
||||||
|
layoutView.findViewById(R.id.date_time).setVisibility(View.VISIBLE);
|
||||||
|
mHour.setTextSize(40);
|
||||||
|
mMinute.setTextSize(26);
|
||||||
|
mHour.setLetterSpacing((float) 0);
|
||||||
|
mMinute.setLetterSpacing((float) 0);
|
||||||
|
|
||||||
|
/* display week number */
|
||||||
|
Boolean isShowWeekNumber = sharedPrefs.getBoolean("show_weeknumber", false);
|
||||||
|
Log.i("---------------------------------","weeknumber refresh ");
|
||||||
|
TextView mWeekNumber= layoutView.findViewById(R.id.weeknumber);
|
||||||
|
if (isShowWeekNumber) {
|
||||||
|
mWeekNumber.setVisibility(View.VISIBLE);
|
||||||
|
mWeekNumber.setText("(" + (new SimpleDateFormat("ww")).format(new Date()) + ")");
|
||||||
|
} else {
|
||||||
|
mWeekNumber.setVisibility(View.GONE);
|
||||||
|
mWeekNumber.setText("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setColorLowRes() {
|
||||||
|
setColorDark();
|
||||||
|
}
|
||||||
|
protected void setColorBright() { setColorDark(); /* getCurrentWatchMode() == WatchMode.AMBIENT or WatchMode.INTERACTIVE */}
|
||||||
|
|
||||||
|
}
|
BIN
wear/src/main/res/drawable/digitalstyle_bg_full_rect.png
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
wear/src/main/res/drawable/digitalstyle_bg_full_round.png
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
wear/src/main/res/drawable/digitalstyle_bg_minimal_rect.png
Normal file
After Width: | Height: | Size: 354 B |
BIN
wear/src/main/res/drawable/digitalstyle_bg_minimal_round.png
Normal file
After Width: | Height: | Size: 354 B |
BIN
wear/src/main/res/drawable/digitalstyle_bg_none_rect.png
Normal file
After Width: | Height: | Size: 137 B |
BIN
wear/src/main/res/drawable/digitalstyle_bg_none_round.png
Normal file
After Width: | Height: | Size: 137 B |
BIN
wear/src/main/res/drawable/digitalstyle_bg_shape_rect.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
wear/src/main/res/drawable/digitalstyle_bg_shape_round.png
Normal file
After Width: | Height: | Size: 69 KiB |
BIN
wear/src/main/res/drawable/watchface_digitalstyle.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
wear/src/main/res/font/roboto_condensed_bold.ttf
Normal file
BIN
wear/src/main/res/font/roboto_condensed_light.ttf
Normal file
BIN
wear/src/main/res/font/roboto_condensed_regular.ttf
Normal file
BIN
wear/src/main/res/font/roboto_slab_light.ttf
Normal file
13
wear/src/main/res/layout/activity_digitalstyle.xml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<android.support.wearable.view.WatchViewStub
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/watch_view_stub"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:rectLayout="@layout/rect_activity_digitalstyle"
|
||||||
|
app:roundLayout="@layout/round_activity_digitalstyle"
|
||||||
|
tools:context=".watchfaces.Home"
|
||||||
|
tools:deviceIds="wear"/>
|
555
wear/src/main/res/layout/rect_activity_digitalstyle.xml
Normal file
|
@ -0,0 +1,555 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/main_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/black"
|
||||||
|
tools:context=".watchfaces.DigitalStyle"
|
||||||
|
tools:deviceIds="wear_square">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- background-image with shapes elements-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/shapes_elements"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/digitalstyle_bg_full_rect"
|
||||||
|
android:contentDescription="rect-shape-elements"
|
||||||
|
android:orientation="horizontal" />
|
||||||
|
|
||||||
|
<!-- root-element-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/watchface_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="8">
|
||||||
|
|
||||||
|
<!-- left side 3/8 width -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="3"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:weightSum="100">
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="13.95" />
|
||||||
|
|
||||||
|
<!-- COB -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="20.44"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="13">
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="4.9" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="7.0"
|
||||||
|
android:gravity="center_horizontal|center_vertical"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:weightSum="5">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/cob_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:fontFamily="@font/roboto_slab_light"
|
||||||
|
android:gravity="bottom|center_horizontal"
|
||||||
|
android:text="@string/activity_carb"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/cobView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="3"
|
||||||
|
android:fontFamily="@font/roboto_slab_light"
|
||||||
|
android:gravity="top|center_horizontal"
|
||||||
|
android:letterSpacing="-0.075"
|
||||||
|
android:lines="1"
|
||||||
|
android:text="000g"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1.1" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="2.87" />
|
||||||
|
|
||||||
|
<!-- SGV / BZ-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="25.48"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="13">
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="3.2" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="8.7"
|
||||||
|
android:gravity="center_horizontal|center_vertical"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:weightSum="20">
|
||||||
|
|
||||||
|
<!-- 1st line with direction and timestamp-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_weight="9"
|
||||||
|
android:baselineAligned="false"
|
||||||
|
android:gravity="center_vertical|center_horizontal"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="10">
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/direction"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_weight="3"
|
||||||
|
android:fontFamily="sans-serif-condensed-medium"
|
||||||
|
android:gravity="center_horizontal|bottom"
|
||||||
|
android:text="--"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/timestamp"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="3dp"
|
||||||
|
android:layout_marginBottom="2dp"
|
||||||
|
android:layout_weight="3"
|
||||||
|
android:fontFamily="sans-serif-condensed-light"
|
||||||
|
android:text="--'"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="2" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 2nd line with sgv-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="-10dp"
|
||||||
|
android:layout_weight="11"
|
||||||
|
android:baselineAligned="false"
|
||||||
|
android:gravity="center_vertical|center_horizontal"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/sgv"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:fontFamily="@font/roboto_slab_light"
|
||||||
|
android:gravity="top|center_horizontal"
|
||||||
|
android:letterSpacing="-0.05"
|
||||||
|
android:lines="1"
|
||||||
|
android:text="00,0"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1.1" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="2.87" />
|
||||||
|
|
||||||
|
<!-- IOB -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="20.44"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="13">
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="4.9" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="7.0"
|
||||||
|
android:gravity="center_horizontal|center_vertical"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:weightSum="5">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/iob_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:fontFamily="@font/roboto_slab_light"
|
||||||
|
android:gravity="bottom|center_horizontal"
|
||||||
|
android:text="@string/activity_IOB"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/iobView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="3"
|
||||||
|
android:fontFamily="@font/roboto_slab_light"
|
||||||
|
android:gravity="top|center_horizontal"
|
||||||
|
android:letterSpacing="-0.075"
|
||||||
|
android:lines="1"
|
||||||
|
android:text="0,00U"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1.1" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="13.95" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- right side 5/8 width -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:baselineAligned="false"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:weightSum="2">
|
||||||
|
|
||||||
|
<!-- right side 1/2 height - top halft -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginLeft="9dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!-- right side top - spacer 2/10 -->
|
||||||
|
<Space
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="2" />
|
||||||
|
|
||||||
|
<!-- right side top - date 4/10 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/date_time"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="4"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:weightSum="2">
|
||||||
|
|
||||||
|
<!-- day name (short)-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/date_time1"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/dayname"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:fontFamily="@font/roboto_condensed_regular"
|
||||||
|
android:text="DDD"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textFontWeight="400"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/weeknumber"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="4"
|
||||||
|
android:fontFamily="@font/roboto_condensed_light"
|
||||||
|
android:text="ww"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textFontWeight="400"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:letterSpacing="-0.1"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="3" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- day number + month (short)-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/date_time2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<!-- day number-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/day"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="@font/roboto_condensed_regular"
|
||||||
|
android:paddingEnd="4dp"
|
||||||
|
android:text="DD"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
<!-- month short-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/month"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:fontFamily="@font/roboto_condensed_regular"
|
||||||
|
android:text="MMM"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- right side top - hour minute 4/10 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="4"
|
||||||
|
android:gravity="left|center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="1">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginTop="-5dp"
|
||||||
|
android:layout_weight="1">
|
||||||
|
<!-- hour -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/hour"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="left"
|
||||||
|
android:fontFamily="@font/roboto_condensed_bold"
|
||||||
|
android:text="HH"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="40sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<!-- minute -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/minute"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="left"
|
||||||
|
android:layout_marginLeft="6sp"
|
||||||
|
android:fontFamily="@font/roboto_condensed_bold"
|
||||||
|
android:paddingTop="5sp"
|
||||||
|
android:text="MI"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="26sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- right side 1/2 height - bottom halft -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginLeft="7dp"
|
||||||
|
android:layout_marginRight="7dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:baselineAligned="false"
|
||||||
|
android:gravity="left|top"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:weightSum="10">
|
||||||
|
|
||||||
|
<!-- right side bottom - statusbar 2/10 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/secondary_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:baselineAligned="false"
|
||||||
|
android:gravity="center_horizontal|center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/delta"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_horizontal|center_vertical"
|
||||||
|
android:text="+/-"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/avgdelta"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_horizontal|center_vertical"
|
||||||
|
android:text="avg"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/uploader_battery"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_horizontal|center_vertical"
|
||||||
|
android:text="--%"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/rig_battery"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_horizontal|center_vertical"
|
||||||
|
android:text="--%"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tmpBasal"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1.7"
|
||||||
|
android:gravity="center_horizontal|center_vertical"
|
||||||
|
android:text="-.--U/h"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/bgiView"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_horizontal|center_vertical"
|
||||||
|
android:text="bgi"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:visibility="gone" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- right side bottom - diagram 6/10 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="6"
|
||||||
|
android:baselineAligned="false"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:weightSum="1">
|
||||||
|
|
||||||
|
<lecho.lib.hellocharts.view.LineChartView
|
||||||
|
android:id="@+id/chart"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_horizontal|top" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- right side bottom - spacer 2/10 -->
|
||||||
|
<Space
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="2" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- FLAGs -->
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/AAPSv2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:text=""
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
555
wear/src/main/res/layout/round_activity_digitalstyle.xml
Normal file
|
@ -0,0 +1,555 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/main_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/black"
|
||||||
|
tools:context=".watchfaces.DigitalStyle"
|
||||||
|
tools:deviceIds="wear_round">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- background-image with shapes elements-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/shapes_elements"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/digitalstyle_bg_full_round"
|
||||||
|
android:contentDescription="round-shape-elements"
|
||||||
|
android:orientation="horizontal" />
|
||||||
|
|
||||||
|
<!-- root-element-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/watchface_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="8">
|
||||||
|
|
||||||
|
<!-- left side 3/8 width -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="3"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:weightSum="100">
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="13.95" />
|
||||||
|
|
||||||
|
<!-- COB -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="20.44"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="13">
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="4.9" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="7.0"
|
||||||
|
android:gravity="center_horizontal|center_vertical"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:weightSum="5">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/cob_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:fontFamily="@font/roboto_slab_light"
|
||||||
|
android:gravity="bottom|center_horizontal"
|
||||||
|
android:text="@string/activity_carb"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/cobView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="3"
|
||||||
|
android:fontFamily="@font/roboto_slab_light"
|
||||||
|
android:gravity="top|center_horizontal"
|
||||||
|
android:letterSpacing="-0.075"
|
||||||
|
android:lines="1"
|
||||||
|
android:text="000g"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1.1" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="2.87" />
|
||||||
|
|
||||||
|
<!-- SGV / BZ-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="25.48"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="13">
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="3.2" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="8.7"
|
||||||
|
android:gravity="center_horizontal|center_vertical"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:weightSum="20">
|
||||||
|
|
||||||
|
<!-- 1st line with direction and timestamp-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_weight="9"
|
||||||
|
android:baselineAligned="false"
|
||||||
|
android:gravity="center_vertical|center_horizontal"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="10">
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/direction"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_weight="3"
|
||||||
|
android:fontFamily="sans-serif-condensed-medium"
|
||||||
|
android:gravity="center_horizontal|bottom"
|
||||||
|
android:text="--"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/timestamp"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="3dp"
|
||||||
|
android:layout_marginBottom="2dp"
|
||||||
|
android:layout_weight="3"
|
||||||
|
android:fontFamily="sans-serif-condensed-light"
|
||||||
|
android:text="--'"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="2" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 2nd line with sgv-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="-10dp"
|
||||||
|
android:layout_weight="11"
|
||||||
|
android:baselineAligned="false"
|
||||||
|
android:gravity="center_vertical|center_horizontal"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/sgv"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:fontFamily="@font/roboto_slab_light"
|
||||||
|
android:gravity="top|center_horizontal"
|
||||||
|
android:letterSpacing="-0.05"
|
||||||
|
android:lines="1"
|
||||||
|
android:text="00,0"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1.1" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="2.87" />
|
||||||
|
|
||||||
|
<!-- IOB -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="20.44"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="13">
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="4.9" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="7.0"
|
||||||
|
android:gravity="center_horizontal|center_vertical"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:weightSum="5">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/iob_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:fontFamily="@font/roboto_slab_light"
|
||||||
|
android:gravity="bottom|center_horizontal"
|
||||||
|
android:text="@string/activity_IOB"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/iobView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="3"
|
||||||
|
android:fontFamily="@font/roboto_slab_light"
|
||||||
|
android:gravity="top|center_horizontal"
|
||||||
|
android:letterSpacing="-0.075"
|
||||||
|
android:lines="1"
|
||||||
|
android:text="0,00U"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1.1" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="13.95" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- right side 5/8 width -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:baselineAligned="false"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:weightSum="2">
|
||||||
|
|
||||||
|
<!-- right side 1/2 height - top halft -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginLeft="9dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!-- right side top - spacer 2/10 -->
|
||||||
|
<Space
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="2" />
|
||||||
|
|
||||||
|
<!-- right side top - date 4/10 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/date_time"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="4"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:weightSum="2">
|
||||||
|
|
||||||
|
<!-- day name (short)-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/date_time1"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/dayname"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:fontFamily="@font/roboto_condensed_regular"
|
||||||
|
android:text="DDD"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textFontWeight="400"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/weeknumber"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="4"
|
||||||
|
android:fontFamily="@font/roboto_condensed_light"
|
||||||
|
android:text="ww"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textFontWeight="400"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:letterSpacing="-0.1"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="3" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- day number + month (short)-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/date_time2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<!-- day number-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/day"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="@font/roboto_condensed_regular"
|
||||||
|
android:paddingEnd="4dp"
|
||||||
|
android:text="DD"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
<!-- month short-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/month"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:fontFamily="@font/roboto_condensed_regular"
|
||||||
|
android:text="MMM"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- right side top - hour minute 4/10 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="4"
|
||||||
|
android:gravity="left|center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="1">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginTop="-5dp"
|
||||||
|
android:layout_weight="1">
|
||||||
|
<!-- hour -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/hour"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="left"
|
||||||
|
android:fontFamily="@font/roboto_condensed_bold"
|
||||||
|
android:text="HH"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="40sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<!-- minute -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/minute"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="left"
|
||||||
|
android:layout_marginLeft="6sp"
|
||||||
|
android:fontFamily="@font/roboto_condensed_bold"
|
||||||
|
android:paddingTop="5sp"
|
||||||
|
android:text="MI"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="26sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- right side 1/2 height - bottom halft -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:baselineAligned="false"
|
||||||
|
android:gravity="left|top"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_marginLeft="7dp"
|
||||||
|
android:layout_marginRight="7dp"
|
||||||
|
android:weightSum="10">
|
||||||
|
|
||||||
|
<!-- right side bottom - statusbar 2/10 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/secondary_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:baselineAligned="false"
|
||||||
|
android:gravity="center_horizontal|center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/delta"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_horizontal|center_vertical"
|
||||||
|
android:text="+/-"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/avgdelta"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_horizontal|center_vertical"
|
||||||
|
android:text="avg"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/uploader_battery"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_horizontal|center_vertical"
|
||||||
|
android:text="--%"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/rig_battery"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_horizontal|center_vertical"
|
||||||
|
android:text="--%"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tmpBasal"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1.7"
|
||||||
|
android:gravity="center_horizontal|center_vertical"
|
||||||
|
android:text="-.--U/h"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/bgiView"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_horizontal|center_vertical"
|
||||||
|
android:text="bgi"
|
||||||
|
android:textColor="@color/light_grey"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:visibility="gone" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- right side bottom - diagram 6/10 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="6"
|
||||||
|
android:baselineAligned="false"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:weightSum="1">
|
||||||
|
|
||||||
|
<lecho.lib.hellocharts.view.LineChartView
|
||||||
|
android:id="@+id/chart"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_horizontal|top" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- right side bottom - spacer 2/10 -->
|
||||||
|
<Space
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="2" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- FLAGs -->
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/AAPSv2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:text=""
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
|
@ -39,37 +39,138 @@
|
||||||
<color name="basal_dark_lowres">@color/grey_500</color>
|
<color name="basal_dark_lowres">@color/grey_500</color>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Material Design - Color Palette -->
|
<!-- Material Design - Color Palette -->
|
||||||
|
<!-- https://designguidelines.withgoogle.com/wearos/style/color.html#color-dark-color-palette-for-wear-os -->
|
||||||
|
<!-- https://material.io/design/color/the-color-system.html#tools-for-picking-colors -->
|
||||||
<!-- Red -->
|
<!-- Red -->
|
||||||
|
<color name="red_100">#FFCDD2</color>
|
||||||
|
<color name="red_500">#F44336</color>
|
||||||
<color name="red_600">#E53935</color>
|
<color name="red_600">#E53935</color>
|
||||||
|
<color name="red_700">#D32F2F</color>
|
||||||
|
<color name="red_900">#B71C1C</color>
|
||||||
<color name="RED">#FF0000</color>
|
<color name="RED">#FF0000</color>
|
||||||
<!-- Red -->
|
|
||||||
|
<!-- Pink -->
|
||||||
|
<color name="pink_100">#F8BBD0</color>
|
||||||
|
<color name="pink_500">#E91E63</color>
|
||||||
|
<color name="pink_700">#C2185B</color>
|
||||||
|
<color name="pink_900">#880E4F</color>
|
||||||
|
|
||||||
|
<!-- Purple -->
|
||||||
|
<color name="purple_100">#E1BEE7</color>
|
||||||
|
<color name="purple_500">#9C27B0</color>
|
||||||
|
<color name="purple_700">#7B1FA2</color>
|
||||||
|
<color name="purple_900">#4A148C</color>
|
||||||
|
|
||||||
|
<!-- Deepe Purple -->
|
||||||
|
<color name="deeppurple_100">#D1C4E9</color>
|
||||||
|
<color name="deeppurple_500">#673AB7</color>
|
||||||
|
<color name="deeppurple_700">#512DA8</color>
|
||||||
|
<color name="deeppurple_900">#311B92</color>
|
||||||
|
|
||||||
|
<!-- Indigo -->
|
||||||
|
<color name="indigo_100">#C5CAE9</color>
|
||||||
|
<color name="indigo_500">#3F51B5</color>
|
||||||
|
<color name="indigo_700">#303F9F</color>
|
||||||
|
<color name="indigo_900">#1A237E</color>
|
||||||
|
|
||||||
<!-- Blue -->
|
<!-- Blue -->
|
||||||
|
<color name="blue_100">#BBDEFB</color>
|
||||||
<color name="blue_300">#64B5F6</color>
|
<color name="blue_300">#64B5F6</color>
|
||||||
<!-- Blue -->
|
<color name="blue_500">#2196F3</color>
|
||||||
|
<color name="blue_700">#1976D2</color>
|
||||||
|
<color name="blue_900">#0D47A1</color>
|
||||||
|
<color name="BLUE">#0000FF</color>
|
||||||
|
|
||||||
|
<!-- Light Blue -->
|
||||||
|
<color name="lightblue_100">#B3E5FC</color>
|
||||||
|
<color name="lightblue_500">#03A9F4</color>
|
||||||
|
<color name="lightblue_700">#0288D1</color>
|
||||||
|
<color name="lightblue_900">#01579B</color>
|
||||||
|
|
||||||
|
<!-- Cyan -->
|
||||||
|
<color name="cyan_100">#B2EBF2</color>
|
||||||
|
<color name="cyan_500">#00BCD4</color>
|
||||||
|
<color name="cyan_700">#0097A7</color>
|
||||||
|
<color name="cyan_900">#006064</color>
|
||||||
|
|
||||||
|
<!-- Teal -->
|
||||||
|
<color name="teal_100">#B2DFDB</color>
|
||||||
|
<color name="teal_500">#009688</color>
|
||||||
|
<color name="teal_700">#00796B</color>
|
||||||
|
<color name="teal_900">#004D40</color>
|
||||||
|
|
||||||
|
<!-- Green -->
|
||||||
|
<color name="green_100">#C8E6C9</color>
|
||||||
|
<color name="green_500">#4CAF50</color>
|
||||||
|
<color name="green_700">#388E3C</color>
|
||||||
|
<color name="green_900">#1B5E20</color>
|
||||||
|
|
||||||
|
<!-- Light Green -->
|
||||||
|
<color name="lightgreen_100">#DCEDC8</color>
|
||||||
|
<color name="lightgreen_500">#8BC34A</color>
|
||||||
|
<color name="lightgreen_700">#689F38</color>
|
||||||
|
<color name="lightgreen_900">#33691E</color>
|
||||||
|
|
||||||
|
<!-- Lime -->
|
||||||
|
<color name="lime_100">#F0F4C3</color>
|
||||||
|
<color name="lime_500">#CDDC39</color>
|
||||||
|
<color name="lime_700">#AFB42B</color>
|
||||||
|
<color name="lime_900">#827717</color>
|
||||||
|
|
||||||
<!-- Yellow -->
|
<!-- Yellow -->
|
||||||
|
<color name="yellow_100">#FFF9C4</color>
|
||||||
|
<color name="yellow_500">#FFEB3B</color>
|
||||||
<color name="yellow_700">#FBC02D</color>
|
<color name="yellow_700">#FBC02D</color>
|
||||||
|
<color name="yellow_900">#F57F17</color>
|
||||||
<color name="yellow_A200">#FFFF00</color>
|
<color name="yellow_A200">#FFFF00</color>
|
||||||
<!-- Yellow -->
|
|
||||||
|
|
||||||
<!-- Grey -->
|
<!-- Amber -->
|
||||||
|
<color name="amber_100">#FFECB3</color>
|
||||||
|
<color name="amber_500">#FFC107</color>
|
||||||
|
<color name="amber_700">#FFA000</color>
|
||||||
|
<color name="amber_900">#FF6F00</color>
|
||||||
|
|
||||||
|
<!-- Orange -->
|
||||||
|
<color name="orange_100">#FFE0B2</color>
|
||||||
|
<color name="orange_500">#FF9800</color>
|
||||||
|
<color name="orange_700">#F57C00</color>
|
||||||
|
<color name="orange_900">#E65100</color>
|
||||||
|
|
||||||
|
<!-- Deep Orange -->
|
||||||
|
<color name="deeporange_100">#FFCCBC</color>
|
||||||
|
<color name="deeporange_500">#FF5722</color>
|
||||||
|
<color name="deeporange_700">#E64A19</color>
|
||||||
|
<color name="deeporange_900">#BF360C</color>
|
||||||
|
|
||||||
|
<!-- Brown -->
|
||||||
|
<color name="brown_100">#D7CCC8</color>
|
||||||
|
<color name="brown_500">#795548</color>
|
||||||
|
<color name="brown_700">#5D4037</color>
|
||||||
|
<color name="brown_900">#3E2723</color>
|
||||||
|
|
||||||
|
<!-- Gray / Grey -->
|
||||||
|
<!-- @ToDo Replace all usage from grey to gray, because that's the official color name in https://material.io/deign/color/ -->
|
||||||
<color name="grey_50">#FAFAFA</color>
|
<color name="grey_50">#FAFAFA</color>
|
||||||
|
<color name="gray_100">#F5F5F5</color>
|
||||||
<color name="grey_300">#E0E0E0</color>
|
<color name="grey_300">#E0E0E0</color>
|
||||||
<color name="grey_500">#9E9E9E</color>
|
<color name="grey_500">#9E9E9E</color>
|
||||||
|
<color name="gray_500">#9E9E9E</color> <!-- needed because rICTxWF01 generate color-names as grAy -->
|
||||||
|
<color name="gray_700">#616161</color>
|
||||||
|
<color name="gray_900">#212121</color>
|
||||||
<color name="grey_steampunk">#333333</color>
|
<color name="grey_steampunk">#333333</color>
|
||||||
<!-- Grey -->
|
|
||||||
|
|
||||||
<!-- Blue Grey -->
|
<!-- Blue Gray -->
|
||||||
<color name="BLUE">#0000FF</color>
|
<color name="bluegray_100">#CFD8DC</color>
|
||||||
<!-- Blue Grey -->
|
<color name="bluegray_500">#607D8B</color>
|
||||||
|
<color name="bluegray_700">#455A64</color>
|
||||||
|
<color name="bluegray_900">#263238</color>
|
||||||
|
|
||||||
<!-- Black -->
|
<!-- Black / White-->
|
||||||
<color name="black">#000000</color>
|
<color name="black">#000000</color>
|
||||||
<!-- Black -->
|
|
||||||
|
|
||||||
<!-- White -->
|
|
||||||
<color name="white">#FFFFFF</color>
|
<color name="white">#FFFFFF</color>
|
||||||
<!-- White -->
|
|
||||||
</resources>
|
</resources>
|
98
wear/src/main/res/values/digitalstyle_arrays.xml
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string-array name="digitalstyle_styles_name">
|
||||||
|
<item>@string/digitalstyle_style_none</item>
|
||||||
|
<item>@string/digitalstyle_style_minimal</item>
|
||||||
|
<item>@string/digitalstyle_style_shape</item>
|
||||||
|
<item>@string/digitalstyle_style_full</item>
|
||||||
|
</string-array>
|
||||||
|
<string-array name="digitalstyle_styles_values">
|
||||||
|
<item>none</item>
|
||||||
|
<item>minimal</item>
|
||||||
|
<item>shape</item>
|
||||||
|
<item>full</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="digitalstyle_color_name">
|
||||||
|
<item>@string/color_name_red</item>
|
||||||
|
<item>@string/color_name_pink</item>
|
||||||
|
<item>@string/color_name_purple</item>
|
||||||
|
<item>@string/color_name_deeppurple</item>
|
||||||
|
<item>@string/color_name_indigo</item>
|
||||||
|
<item>@string/color_name_blue</item>
|
||||||
|
<item>@string/color_name_lightblue</item>
|
||||||
|
<item>@string/color_name_cyan</item>
|
||||||
|
<item>@string/color_name_teal</item>
|
||||||
|
<item>@string/color_name_green</item>
|
||||||
|
<item>@string/color_name_lightgreen</item>
|
||||||
|
<item>@string/color_name_lime</item>
|
||||||
|
<item>@string/color_name_yellow</item>
|
||||||
|
<item>@string/color_name_amber</item>
|
||||||
|
<item>@string/color_name_orange</item>
|
||||||
|
<item>@string/color_name_deeporange</item>
|
||||||
|
<item>@string/color_name_brown</item>
|
||||||
|
<item>@string/color_name_gray</item>
|
||||||
|
<item>@string/color_name_bluegray</item>
|
||||||
|
<item>@string/color_name_white</item>
|
||||||
|
<item>@string/color_name_multicolor</item>
|
||||||
|
</string-array>
|
||||||
|
<string-array name="digitalstyle_color_values">
|
||||||
|
<item>red</item>
|
||||||
|
<item>pink</item>
|
||||||
|
<item>purple</item>
|
||||||
|
<item>deeppurple</item>
|
||||||
|
<item>indigo</item>
|
||||||
|
<item>blue</item>
|
||||||
|
<item>lightblue</item>
|
||||||
|
<item>cyan</item>
|
||||||
|
<item>teal</item>
|
||||||
|
<item>green</item>
|
||||||
|
<item>lightgreen</item>
|
||||||
|
<item>lime</item>
|
||||||
|
<item>yellow</item>
|
||||||
|
<item>amber</item>
|
||||||
|
<item>orange</item>
|
||||||
|
<item>deeporange</item>
|
||||||
|
<item>brown</item>
|
||||||
|
<item>gray</item>
|
||||||
|
<item>bluegray</item>
|
||||||
|
<item>white</item>
|
||||||
|
<item>multicolor</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
|
||||||
|
<string-array name="digitalstyle_color_saturation">
|
||||||
|
<item>100</item>
|
||||||
|
<item>500</item>
|
||||||
|
<item>700</item>
|
||||||
|
<item>900</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
|
||||||
|
<string-array name="digitalstyle_color_opacity_name">
|
||||||
|
<item>10%</item>
|
||||||
|
<item>20%</item>
|
||||||
|
<item>30%</item>
|
||||||
|
<item>40%</item>
|
||||||
|
<item>50%</item>
|
||||||
|
<item>60%</item>
|
||||||
|
<item>70%</item>
|
||||||
|
<item>80%</item>
|
||||||
|
<item>90%</item>
|
||||||
|
<item>100%</item>
|
||||||
|
</string-array>
|
||||||
|
<string-array name="digitalstyle_color_opacity_value">
|
||||||
|
<item>0.1</item>
|
||||||
|
<item>0.2</item>
|
||||||
|
<item>0.3</item>
|
||||||
|
<item>0.4</item>
|
||||||
|
<item>0.5</item>
|
||||||
|
<item>0.6</item>
|
||||||
|
<item>0.7</item>
|
||||||
|
<item>0.8</item>
|
||||||
|
<item>0.9</item>
|
||||||
|
<item>1</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
|
||||||
|
</resources>
|
|
@ -9,6 +9,11 @@
|
||||||
<string name="label_xdrip_big_chart">AAPS(BigChart)</string>
|
<string name="label_xdrip_big_chart">AAPS(BigChart)</string>
|
||||||
<string name="label_xdrip_no_chart">AAPS(NoChart)</string>
|
<string name="label_xdrip_no_chart">AAPS(NoChart)</string>
|
||||||
<string name="label_xdrip_circle">AAPS(Circle)</string>
|
<string name="label_xdrip_circle">AAPS(Circle)</string>
|
||||||
|
<string name="label_xdrip_v2">AAPSv2</string>
|
||||||
|
<string name="label_xdrip_cockpit">AAPS(Cockpit)</string>
|
||||||
|
<string name="label_xdrip_steampunk">AAPS(Steampunk)</string>
|
||||||
|
<string name="label_digitalstyle">AAPS(DigitalStyle)</string>
|
||||||
|
|
||||||
|
|
||||||
<string name="label_warning_sync">No data!</string>
|
<string name="label_warning_sync">No data!</string>
|
||||||
<string name="label_warning_old">Old data!</string>
|
<string name="label_warning_old">Old data!</string>
|
||||||
|
@ -102,4 +107,43 @@
|
||||||
<string name="activity_no_status">no status</string>
|
<string name="activity_no_status">no status</string>
|
||||||
|
|
||||||
|
|
||||||
|
<string name="color_name_red">red</string>
|
||||||
|
<string name="color_name_pink">pink</string>
|
||||||
|
<string name="color_name_purple">purple</string>
|
||||||
|
<string name="color_name_deeppurple">deep purple</string>
|
||||||
|
<string name="color_name_indigo">indigo</string>
|
||||||
|
<string name="color_name_blue">blue</string>
|
||||||
|
<string name="color_name_lightblue">light blue</string>
|
||||||
|
<string name="color_name_cyan">cyan</string>
|
||||||
|
<string name="color_name_teal">teal</string>
|
||||||
|
<string name="color_name_green">green</string>
|
||||||
|
<string name="color_name_lightgreen">light green</string>
|
||||||
|
<string name="color_name_lime">lime</string>
|
||||||
|
<string name="color_name_yellow">yellow</string>
|
||||||
|
<string name="color_name_amber">amber</string>
|
||||||
|
<string name="color_name_orange">orange</string>
|
||||||
|
<string name="color_name_deeporange">deep orange</string>
|
||||||
|
<string name="color_name_brown">brown</string>
|
||||||
|
<string name="color_name_gray">gray</string>
|
||||||
|
<string name="color_name_bluegray">blue gray</string>
|
||||||
|
<string name="color_name_white">white</string>
|
||||||
|
<string name="color_name_black">black</string>
|
||||||
|
<string name="color_name_multicolor">multicolor</string>
|
||||||
|
|
||||||
|
|
||||||
|
<string name="pref_vibrate_hourly">Vibrate hourly</string>
|
||||||
|
<string name="pref_show_weeknumber">Show Week number</string>
|
||||||
|
|
||||||
|
<string name="digitalstyle_pref_your_style">Your style:</string>
|
||||||
|
<string name="digitalstyle_style_none">no style</string>
|
||||||
|
<string name="digitalstyle_style_minimal">minimal style</string>
|
||||||
|
<string name="digitalstyle_style_shape">shape style</string>
|
||||||
|
<string name="digitalstyle_style_full">full style</string>
|
||||||
|
|
||||||
|
<string name="digitalstyle_pref_your_color">Your color:</string>
|
||||||
|
<string name="digitalstyle_pref_your_color_saturation">Your color saturation:</string>
|
||||||
|
<string name="digitalstyle_pref_your_color_opacity">Your color opacity:</string>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -237,6 +237,13 @@
|
||||||
app:wear_iconOff="@drawable/settings_off"
|
app:wear_iconOff="@drawable/settings_off"
|
||||||
app:wear_iconOn="@drawable/settings_on"/>
|
app:wear_iconOn="@drawable/settings_on"/>
|
||||||
|
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:key="vibrate_Hourly"
|
||||||
|
android:title="@string/pref_vibrate_hourly"
|
||||||
|
android:defaultValue="false"
|
||||||
|
app:wear_iconOff="@drawable/settings_off"
|
||||||
|
app:wear_iconOn="@drawable/settings_on" />
|
||||||
|
|
||||||
<info.nightscout.androidaps.interaction.utils.VersionPreference
|
<info.nightscout.androidaps.interaction.utils.VersionPreference
|
||||||
android:defaultValue="1"
|
android:defaultValue="1"
|
||||||
android:entries="@array/input_design"
|
android:entries="@array/input_design"
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
|
|
||||||
|
<ListPreference
|
||||||
|
android:key="digitalstyle_frameStyle"
|
||||||
|
android:title="@string/digitalstyle_pref_your_style"
|
||||||
|
android:defaultValue="full"
|
||||||
|
android:entries="@array/digitalstyle_styles_name"
|
||||||
|
android:entryValues="@array/digitalstyle_styles_values"/>
|
||||||
|
|
||||||
|
<ListPreference
|
||||||
|
android:key="digitalstyle_frameColor"
|
||||||
|
android:title="@string/digitalstyle_pref_your_color"
|
||||||
|
android:defaultValue="red"
|
||||||
|
android:entries="@array/digitalstyle_color_name"
|
||||||
|
android:entryValues="@array/digitalstyle_color_values"/>
|
||||||
|
<ListPreference
|
||||||
|
android:key="digitalstyle_frameColorSaturation"
|
||||||
|
android:title="@string/digitalstyle_pref_your_color_saturation"
|
||||||
|
android:defaultValue="700"
|
||||||
|
android:entries="@array/digitalstyle_color_saturation"
|
||||||
|
android:entryValues="@array/digitalstyle_color_saturation"/>
|
||||||
|
|
||||||
|
<ListPreference
|
||||||
|
android:key="digitalstyle_frameColorOpacity"
|
||||||
|
android:title="@string/digitalstyle_pref_your_color_opacity"
|
||||||
|
android:defaultValue="1"
|
||||||
|
android:entries="@array/digitalstyle_color_opacity_name"
|
||||||
|
android:entryValues="@array/digitalstyle_color_opacity_value"/>
|
||||||
|
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:key="show_date"
|
||||||
|
android:title="@string/pref_show_date"
|
||||||
|
android:defaultValue="true"
|
||||||
|
app:wear_iconOff="@drawable/settings_off"
|
||||||
|
app:wear_iconOn="@drawable/settings_on" />
|
||||||
|
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:key="show_weeknumber"
|
||||||
|
android:title="@string/pref_show_weeknumber"
|
||||||
|
android:defaultValue="false"
|
||||||
|
app:wear_iconOff="@drawable/settings_off"
|
||||||
|
app:wear_iconOn="@drawable/settings_on" />
|
||||||
|
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:key="vibrate_Hourly"
|
||||||
|
android:title="@string/pref_vibrate_hourly"
|
||||||
|
android:defaultValue="false"
|
||||||
|
app:wear_iconOff="@drawable/settings_off"
|
||||||
|
app:wear_iconOn="@drawable/settings_on" />
|
||||||
|
</PreferenceScreen>
|