Steampunk watch face (for testing)

This commit is contained in:
Andrew Warrington 2017-12-10 21:39:21 +01:00
parent c3aef7b6f2
commit 74e833c873
11 changed files with 540 additions and 255 deletions

View file

@ -51,7 +51,7 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferen
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, mSgv, mDirection, mTimestamp, mUploaderBattery, mRigBattery, mDelta, mAvgDelta, mStatus, mBasalRate, mIOB1, mIOB2, mCOB1, mCOB2, mBgi, mLoop, mDay, mMonth, isAAPSv2, mHighLight, mLowLight;
public ImageView mGlucoseDial, mDeltaGauge; public ImageView mGlucoseDial, mDeltaGauge, mHourHand, mMinuteHand;
public long datetime; public long datetime;
public RelativeLayout mRelativeLayout; public RelativeLayout mRelativeLayout;
public LinearLayout mLinearLayout, mLinearLayout2, mDate; public LinearLayout mLinearLayout, mLinearLayout2, mDate;
@ -101,6 +101,8 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferen
public String sCOB1 = "Carb"; public String sCOB1 = "Carb";
public String sCOB2 = "--g"; public String sCOB2 = "--g";
public String sBgi = "--"; public String sBgi = "--";
public String sMinute = "0";
public String sHour = "0";
@Override @Override
public void onCreate() { public void onCreate() {
@ -163,7 +165,9 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferen
mLinearLayout = (LinearLayout) stub.findViewById(R.id.secondary_layout); mLinearLayout = (LinearLayout) stub.findViewById(R.id.secondary_layout);
mLinearLayout2 = (LinearLayout) stub.findViewById(R.id.tertiary_layout); mLinearLayout2 = (LinearLayout) stub.findViewById(R.id.tertiary_layout);
mGlucoseDial = (ImageView) stub.findViewById(R.id.glucose_dial); mGlucoseDial = (ImageView) stub.findViewById(R.id.glucose_dial);
mDeltaGauge = (ImageView) stub.findViewById(R.id.delta_gauge); mDeltaGauge = (ImageView) stub.findViewById(R.id.delta_pointer);
mHourHand = (ImageView) stub.findViewById(R.id.hour_hand);
mMinuteHand = (ImageView) stub.findViewById(R.id.minute_hand);
chart = (LineChartView) stub.findViewById(R.id.chart); chart = (LineChartView) stub.findViewById(R.id.chart);
layoutSet = true; layoutSet = true;
@ -486,13 +490,18 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferen
mTime.setText(timeFormat.format(System.currentTimeMillis())); mTime.setText(timeFormat.format(System.currentTimeMillis()));
} }
Date now = new Date();
SimpleDateFormat sdfHour = new SimpleDateFormat("HH");
SimpleDateFormat sdfMinute = new SimpleDateFormat("mm");
sHour = sdfHour.format(now);
sMinute = sdfMinute.format(now);
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)) {
Date today = new Date();
SimpleDateFormat sdfDay = new SimpleDateFormat("dd"); SimpleDateFormat sdfDay = new SimpleDateFormat("dd");
SimpleDateFormat sdfMonth = new SimpleDateFormat("MMM"); SimpleDateFormat sdfMonth = new SimpleDateFormat("MMM");
mDay.setText(sdfDay.format(today)); mDay.setText(sdfDay.format(now));
mMonth.setText(sdfMonth.format(today)); mMonth.setText(sdfMonth.format(now));
mDate.setVisibility(View.VISIBLE); mDate.setVisibility(View.VISIBLE);
} else { } else {
mDate.setVisibility(View.GONE); mDate.setVisibility(View.GONE);

View file

@ -11,9 +11,6 @@ import android.view.animation.RotateAnimation;
import info.nightscout.androidaps.R; import info.nightscout.androidaps.R;
import info.nightscout.androidaps.interaction.menus.MainMenuActivity; import info.nightscout.androidaps.interaction.menus.MainMenuActivity;
import static android.view.View.GONE;
import static android.view.View.VISIBLE;
/** /**
* Created by andrew-warrington on 01/12/2017. * Created by andrew-warrington on 01/12/2017.
*/ */
@ -22,6 +19,7 @@ public class Steampunk extends BaseWatchFace {
private long sgvTapTime = 0; private long sgvTapTime = 0;
private float lastEndDegrees = 0f; private float lastEndDegrees = 0f;
private float deltaRotationAngle = 0f;
@Override @Override
public void onCreate() { public void onCreate() {
@ -60,10 +58,10 @@ public class Steampunk extends BaseWatchFace {
protected void setColorDark() { protected void setColorDark() {
//rotate glucose dial. //rotate glucose dial.
float rotationAngle = 0f; float rotationAngle = 0f; //by default, show ? on the dial (? is at 0 degrees on the dial)
if (!sSgv.equals("---")) rotationAngle = Float.valueOf(sSgv); if (!sSgv.equals("---")) rotationAngle = Float.valueOf(sSgv); //if glucose a value is received, use it to determine the amount of rotation of the dial.
if (rotationAngle > 330) rotationAngle = 330; if (rotationAngle > 330) rotationAngle = 330; //if the glucose value is higher than 330 then show "HIGH" on the dial. ("HIGH" is at 330 degrees on the dial)
if (rotationAngle != 0 && rotationAngle < 30) rotationAngle = 30; if (rotationAngle != 0 && rotationAngle < 30) rotationAngle = 30; //if the glucose value is lower than 30 show "LOW" on the dial. ("LOW" is at 30 degrees on the dial)
RotateAnimation rotate = new RotateAnimation( RotateAnimation rotate = new RotateAnimation(
lastEndDegrees, rotationAngle - lastEndDegrees, lastEndDegrees, rotationAngle - lastEndDegrees,
@ -73,26 +71,24 @@ public class Steampunk extends BaseWatchFace {
rotate.setInterpolator(new LinearInterpolator()); rotate.setInterpolator(new LinearInterpolator());
rotate.setDuration(2000); rotate.setDuration(2000);
mGlucoseDial.startAnimation(rotate); mGlucoseDial.startAnimation(rotate);
lastEndDegrees = rotationAngle; lastEndDegrees = rotationAngle; //store the final angle as a starting point for the next rotation.
//rotate delta gauge. //rotate delta pointer.
rotationAngle = 0f; float deltaIsNegative = 1f; //by default go clockwise
//for each 10 in avgDelta we need to move 15 degrees, hence multiply avgDelta by 1.5. if (!sAvgDelta.equals("--")) { //if a legitimate delta value is received, then...
if (!sAvgDelta.equals("--")) rotationAngle = (Float.valueOf(sAvgDelta.substring(1)) * 1.5f); if (sAvgDelta.substring(0,1).equals("-")) deltaIsNegative = -1f; //if the delta is negative, go counter-clockwise
if (rotationAngle > 35 || rotationAngle < -35) { //if the needle will go off the chart in either direction... deltaRotationAngle = (Float.valueOf(sAvgDelta.substring(1)) * 1.5f); //get rid of the sign so it can be converted to float. then, for each 10 in avgDelta we need to move 15 degrees, hence multiply avgDelta by 1.5.
mDeltaGauge.setVisibility(GONE); if (deltaRotationAngle > 35) deltaRotationAngle = 35f;
} else { if (deltaRotationAngle < -35) deltaRotationAngle = -35f; //if the needle will go off the chart in either direction, make it stop at the end of the gauge.
mDeltaGauge.setVisibility(VISIBLE); mDeltaGauge.setRotation(deltaRotationAngle * deltaIsNegative);
rotate = new RotateAnimation(
0f, rotationAngle * -1,
Animation.RELATIVE_TO_SELF, 0.5f,
Animation.RELATIVE_TO_SELF, 0.5f);
rotate.setFillAfter(true);
rotate.setInterpolator(new LinearInterpolator());
rotate.setDuration(2000);
mDeltaGauge.startAnimation(rotate);
} }
//rotate the minute hand.
mMinuteHand.setRotation(Float.valueOf(sMinute) * 6f);
//rotate the hour hand.
mHourHand.setRotation((Float.valueOf(sHour) * 30f) + (Float.valueOf(sMinute) * 0.5f));
setTextSizes(); setTextSizes();
if (mLoop != null) { if (mLoop != null) {
@ -100,8 +96,8 @@ public class Steampunk extends BaseWatchFace {
} }
if (chart != null) { if (chart != null) {
highColor = ContextCompat.getColor(getApplicationContext(), R.color.light_highColor); highColor = ContextCompat.getColor(getApplicationContext(), R.color.black);
lowColor = ContextCompat.getColor(getApplicationContext(), R.color.light_lowColor); lowColor = ContextCompat.getColor(getApplicationContext(), R.color.black);
midColor = ContextCompat.getColor(getApplicationContext(), R.color.black); midColor = ContextCompat.getColor(getApplicationContext(), R.color.black);
gridColor = ContextCompat.getColor(getApplicationContext(), R.color.grey_steampunk); gridColor = ContextCompat.getColor(getApplicationContext(), R.color.grey_steampunk);
basalBackgroundColor = ContextCompat.getColor(getApplicationContext(), R.color.basal_dark); basalBackgroundColor = ContextCompat.getColor(getApplicationContext(), R.color.basal_dark);
@ -124,14 +120,22 @@ public class Steampunk extends BaseWatchFace {
protected void setTextSizes() { protected void setTextSizes() {
if (mUploaderBattery != null && mRigBattery != null) { if (bIsRound) {
if (bIsRound) { mCOB2.setTextSize(13);
mUploaderBattery.setTextSize(13); mBasalRate.setTextSize(13);
mRigBattery.setTextSize(13); mIOB2.setTextSize(12);
} else { mTimestamp.setTextSize(12);
mUploaderBattery.setTextSize(12); mLoop.setTextSize(12);
mRigBattery.setTextSize(12); mUploaderBattery.setTextSize(11);
} mRigBattery.setTextSize(11);
} else {
mCOB2.setTextSize(11);
mBasalRate.setTextSize(11);
mIOB2.setTextSize(10);
mTimestamp.setTextSize(9);
mLoop.setTextSize(9);
mUploaderBattery.setTextSize(9);
mRigBattery.setTextSize(9);
} }
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 645 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 KiB

After

Width:  |  Height:  |  Size: 645 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 KiB

After

Width:  |  Height:  |  Size: 645 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 KiB

After

Width:  |  Height:  |  Size: 317 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

After

Width:  |  Height:  |  Size: 163 KiB

View file

@ -26,16 +26,20 @@
android:id="@+id/secondary_layout" android:id="@+id/secondary_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center"
android:background="@drawable/steampunk_gauge" android:background="@drawable/steampunk_gauge"
android:orientation="vertical"> android:gravity="center"
android:orientation="vertical"
android:weightSum="1">
<ImageView <ImageView
android:id="@+id/delta_gauge" android:id="@+id/delta_pointer"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="0px"
android:src="@drawable/steampunk_pointer"
android:layout_gravity="center" android:layout_gravity="center"
android:gravity="center"/> android:layout_weight="0.69"
android:gravity="center"
android:src="@drawable/steampunk_pointer" />
</LinearLayout> </LinearLayout>
@ -57,127 +61,105 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0px" android:layout_height="0px"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_weight="0.11" android:layout_weight="0.05"
android:gravity="center" android:gravity="center"
android:orientation="horizontal"> android:orientation="horizontal"/>
</LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0px" android:layout_height="0px"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_weight="0.2" android:layout_weight="0.26"
android:gravity="center" android:gravity="center"
android:orientation="horizontal" android:orientation="horizontal"
android:weightSum="1"> android:weightSum="1">
<TextView <TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.2"
android:gravity="center" />
<TextView
android:id="@+id/cobView"
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_weight="0.2" android:layout_weight="0.2"
android:gravity="center" android:gravity="center"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="11sp" android:textSize="11sp"
android:textStyle="bold" /> android:textStyle="bold" />
<TextView <LinearLayout
android:id="@+id/tmpBasal"
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.2" android:layout_weight="0.2"
android:gravity="center" android:orientation="horizontal">
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="11sp"
android:textStyle="bold" />
<TextView
android:id="@+id/iobView" <TextView
android:id="@+id/cobView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingEnd="10dp"
android:paddingTop="6dp"
android:rotation="-25"
android:text="--g"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="13sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.2" android:layout_weight="0.2"
android:gravity="center" android:orientation="horizontal">
android:textAlignment="center"
android:textColor="@color/black_86p" <TextView
android:textSize="11sp" android:id="@+id/tmpBasal"
android:textStyle="bold" /> android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingBottom="12dp"
android:text="-.--U/h"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="13sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:orientation="horizontal">
<TextView
android:id="@+id/iobView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingStart="10dp"
android:paddingTop="6dp"
android:rotation="28"
android:text="0.00U"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="12sp"
android:textStyle="bold" />
</LinearLayout>
<TextView <TextView
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_weight="0.2" android:layout_weight="0.2"
android:gravity="center" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.21"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="1">
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.34"
android:gravity="center" />
<TextView
android:id="@+id/loop"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.11"
android:gravity="center" android:gravity="center"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="11sp" android:textSize="11sp"
android:textStyle="bold" /> android:textStyle="bold" />
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.1"
android:gravity="center" />
<TextView
android:id="@+id/timestamp"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.11"
android:gravity="center"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="11sp"
android:textStyle="bold" />
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.34"
android:gravity="center" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
@ -191,10 +173,9 @@
<LinearLayout <LinearLayout
android:layout_width="0px" android:layout_width="0px"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_weight="0.25" android:layout_weight="0.25"
android:orientation="horizontal"> android:orientation="horizontal"/>
</LinearLayout>
<lecho.lib.hellocharts.view.LineChartView <lecho.lib.hellocharts.view.LineChartView
android:id="@+id/chart" android:id="@+id/chart"
@ -204,10 +185,9 @@
<LinearLayout <LinearLayout
android:layout_width="0px" android:layout_width="0px"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_weight="0.25" android:layout_weight="0.25"
android:orientation="horizontal"> android:orientation="horizontal"/>
</LinearLayout>
</LinearLayout> </LinearLayout>
@ -215,7 +195,133 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0px" android:layout_height="0px"
android:layout_weight="0.03" android:layout_weight="0.03"
android:orientation="vertical"> android:orientation="vertical"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_gravity="center"
android:gravity="center"
android:weightSum="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.15"
android:orientation="horizontal"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.21"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="1">
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.34"
android:orientation="horizontal"/>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.11"
android:orientation="horizontal">
<TextView
android:id="@+id/loop"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingEnd="8dp"
android:paddingTop="8dp"
android:rotation="-21"
android:text="-'"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="12sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/rig_battery"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="--%"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="11sp"
android:textStyle="bold"
android:visibility="gone" />
<TextView
android:id="@+id/uploader_battery"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="--%"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="11sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.11"
android:orientation="horizontal">
<TextView
android:id="@+id/timestamp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingStart="10dp"
android:paddingTop="8dp"
android:rotation="21"
android:text="-'"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="12sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.34"
android:orientation="horizontal"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.64"
android:orientation="horizontal">
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
@ -228,18 +334,48 @@
android:orientation="vertical"> android:orientation="vertical">
</LinearLayout> </LinearLayout>
<ImageView
android:id="@+id/hour_hand"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/steampunk_hour_hand"
android:orientation="vertical"/>
<ImageView <LinearLayout
android:id="@+id/minute_hand"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/steampunk_minute_hand" android:layout_gravity="center"
android:orientation="vertical"/> android:gravity="center"
android:orientation="vertical"
android:weightSum="1">
<ImageView
android:id="@+id/hour_hand"
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_weight="0.3"
android:orientation="vertical"
android:rotation="60"
android:src="@drawable/steampunk_hour_hand" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical"
android:weightSum="1">
<ImageView
android:id="@+id/minute_hand"
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_weight="0.3"
android:orientation="vertical"
android:src="@drawable/steampunk_minute_hand" />
</LinearLayout>
<TextView
android:id="@+id/AAPSv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"/>
</RelativeLayout> </RelativeLayout>

View file

@ -26,16 +26,20 @@
android:id="@+id/secondary_layout" android:id="@+id/secondary_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center"
android:background="@drawable/steampunk_gauge" android:background="@drawable/steampunk_gauge"
android:orientation="vertical"> android:gravity="center"
android:orientation="vertical"
android:weightSum="1">
<ImageView <ImageView
android:id="@+id/delta_gauge" android:id="@+id/delta_pointer"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="0px"
android:src="@drawable/steampunk_pointer"
android:layout_gravity="center" android:layout_gravity="center"
android:gravity="center"/> android:layout_weight="0.69"
android:gravity="center"
android:src="@drawable/steampunk_pointer" />
</LinearLayout> </LinearLayout>
@ -57,127 +61,105 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0px" android:layout_height="0px"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_weight="0.11" android:layout_weight="0.05"
android:gravity="center" android:gravity="center"
android:orientation="horizontal"> android:orientation="horizontal"/>
</LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0px" android:layout_height="0px"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_weight="0.2" android:layout_weight="0.26"
android:gravity="center" android:gravity="center"
android:orientation="horizontal" android:orientation="horizontal"
android:weightSum="1"> android:weightSum="1">
<TextView <TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.2"
android:gravity="center" />
<TextView
android:id="@+id/cobView"
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_weight="0.2" android:layout_weight="0.2"
android:gravity="center" android:gravity="center"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="11sp" android:textSize="11sp"
android:textStyle="bold" /> android:textStyle="bold" />
<TextView <LinearLayout
android:id="@+id/tmpBasal"
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.2" android:layout_weight="0.2"
android:gravity="center" android:orientation="horizontal">
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="11sp"
android:textStyle="bold" />
<TextView
android:id="@+id/iobView" <TextView
android:id="@+id/cobView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingEnd="10dp"
android:paddingTop="6dp"
android:rotation="-28"
android:text="--g"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="13sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.2" android:layout_weight="0.2"
android:gravity="center" android:orientation="horizontal">
android:textAlignment="center"
android:textColor="@color/black_86p" <TextView
android:textSize="11sp" android:id="@+id/tmpBasal"
android:textStyle="bold" /> android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingBottom="12dp"
android:text="-.--U/h"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="13sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:orientation="horizontal">
<TextView
android:id="@+id/iobView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingStart="10dp"
android:paddingTop="6dp"
android:rotation="28"
android:text="0.00U"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="12sp"
android:textStyle="bold" />
</LinearLayout>
<TextView <TextView
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_weight="0.2" android:layout_weight="0.2"
android:gravity="center" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.21"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="1">
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.34"
android:gravity="center" />
<TextView
android:id="@+id/loop"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.11"
android:gravity="center" android:gravity="center"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="11sp" android:textSize="11sp"
android:textStyle="bold" /> android:textStyle="bold" />
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.1"
android:gravity="center" />
<TextView
android:id="@+id/timestamp"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.11"
android:gravity="center"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="11sp"
android:textStyle="bold" />
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.34"
android:gravity="center" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
@ -191,10 +173,9 @@
<LinearLayout <LinearLayout
android:layout_width="0px" android:layout_width="0px"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_weight="0.25" android:layout_weight="0.25"
android:orientation="horizontal"> android:orientation="horizontal"/>
</LinearLayout>
<lecho.lib.hellocharts.view.LineChartView <lecho.lib.hellocharts.view.LineChartView
android:id="@+id/chart" android:id="@+id/chart"
@ -204,10 +185,9 @@
<LinearLayout <LinearLayout
android:layout_width="0px" android:layout_width="0px"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_weight="0.25" android:layout_weight="0.25"
android:orientation="horizontal"> android:orientation="horizontal"/>
</LinearLayout>
</LinearLayout> </LinearLayout>
@ -215,7 +195,133 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0px" android:layout_height="0px"
android:layout_weight="0.03" android:layout_weight="0.03"
android:orientation="vertical"> android:orientation="vertical"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_gravity="center"
android:gravity="center"
android:weightSum="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.15"
android:orientation="horizontal"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.21"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="1">
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.34"
android:orientation="horizontal"/>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.11"
android:orientation="horizontal">
<TextView
android:id="@+id/loop"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingEnd="8dp"
android:paddingTop="8dp"
android:rotation="-24"
android:text="-'"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="12sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/rig_battery"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="--%"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="11sp"
android:textStyle="bold"
android:visibility="gone" />
<TextView
android:id="@+id/uploader_battery"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="--%"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="11sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.11"
android:orientation="horizontal">
<TextView
android:id="@+id/timestamp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingStart="10dp"
android:paddingTop="8dp"
android:rotation="24"
android:text="-'"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="12sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.34"
android:orientation="horizontal"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.64"
android:orientation="horizontal">
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
@ -228,18 +334,48 @@
android:orientation="vertical"> android:orientation="vertical">
</LinearLayout> </LinearLayout>
<ImageView
android:id="@+id/hour_hand"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/steampunk_hour_hand"
android:orientation="vertical"/>
<ImageView <LinearLayout
android:id="@+id/minute_hand"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/steampunk_minute_hand" android:layout_gravity="center"
android:orientation="vertical"/> android:gravity="center"
android:orientation="vertical"
android:weightSum="1">
<ImageView
android:id="@+id/hour_hand"
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_weight="0.3"
android:orientation="vertical"
android:rotation="60"
android:src="@drawable/steampunk_hour_hand" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical"
android:weightSum="1">
<ImageView
android:id="@+id/minute_hand"
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_weight="0.3"
android:orientation="vertical"
android:src="@drawable/steampunk_minute_hand" />
</LinearLayout>
<TextView
android:id="@+id/AAPSv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"/>
</RelativeLayout> </RelativeLayout>