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 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 ImageView mGlucoseDial, mDeltaGauge;
public ImageView mGlucoseDial, mDeltaGauge, mHourHand, mMinuteHand;
public long datetime;
public RelativeLayout mRelativeLayout;
public LinearLayout mLinearLayout, mLinearLayout2, mDate;
@ -101,6 +101,8 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferen
public String sCOB1 = "Carb";
public String sCOB2 = "--g";
public String sBgi = "--";
public String sMinute = "0";
public String sHour = "0";
@Override
public void onCreate() {
@ -163,7 +165,9 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferen
mLinearLayout = (LinearLayout) stub.findViewById(R.id.secondary_layout);
mLinearLayout2 = (LinearLayout) stub.findViewById(R.id.tertiary_layout);
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);
layoutSet = true;
@ -486,13 +490,18 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferen
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 (sharedPrefs.getBoolean("show_date", false)) {
Date today = new Date();
SimpleDateFormat sdfDay = new SimpleDateFormat("dd");
SimpleDateFormat sdfMonth = new SimpleDateFormat("MMM");
mDay.setText(sdfDay.format(today));
mMonth.setText(sdfMonth.format(today));
mDay.setText(sdfDay.format(now));
mMonth.setText(sdfMonth.format(now));
mDate.setVisibility(View.VISIBLE);
} else {
mDate.setVisibility(View.GONE);

View file

@ -11,9 +11,6 @@ import android.view.animation.RotateAnimation;
import info.nightscout.androidaps.R;
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.
*/
@ -22,6 +19,7 @@ public class Steampunk extends BaseWatchFace {
private long sgvTapTime = 0;
private float lastEndDegrees = 0f;
private float deltaRotationAngle = 0f;
@Override
public void onCreate() {
@ -60,10 +58,10 @@ public class Steampunk extends BaseWatchFace {
protected void setColorDark() {
//rotate glucose dial.
float rotationAngle = 0f;
if (!sSgv.equals("---")) rotationAngle = Float.valueOf(sSgv);
if (rotationAngle > 330) rotationAngle = 330;
if (rotationAngle != 0 && rotationAngle < 30) rotationAngle = 30;
float rotationAngle = 0f; //by default, show ? on the dial (? is at 0 degrees on the dial)
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 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 the glucose value is lower than 30 show "LOW" on the dial. ("LOW" is at 30 degrees on the dial)
RotateAnimation rotate = new RotateAnimation(
lastEndDegrees, rotationAngle - lastEndDegrees,
@ -73,26 +71,24 @@ public class Steampunk extends BaseWatchFace {
rotate.setInterpolator(new LinearInterpolator());
rotate.setDuration(2000);
mGlucoseDial.startAnimation(rotate);
lastEndDegrees = rotationAngle;
lastEndDegrees = rotationAngle; //store the final angle as a starting point for the next rotation.
//rotate delta gauge.
rotationAngle = 0f;
//for each 10 in avgDelta we need to move 15 degrees, hence multiply avgDelta by 1.5.
if (!sAvgDelta.equals("--")) rotationAngle = (Float.valueOf(sAvgDelta.substring(1)) * 1.5f);
if (rotationAngle > 35 || rotationAngle < -35) { //if the needle will go off the chart in either direction...
mDeltaGauge.setVisibility(GONE);
} else {
mDeltaGauge.setVisibility(VISIBLE);
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 delta pointer.
float deltaIsNegative = 1f; //by default go clockwise
if (!sAvgDelta.equals("--")) { //if a legitimate delta value is received, then...
if (sAvgDelta.substring(0,1).equals("-")) deltaIsNegative = -1f; //if the delta is negative, go counter-clockwise
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.
if (deltaRotationAngle > 35) deltaRotationAngle = 35f;
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.setRotation(deltaRotationAngle * deltaIsNegative);
}
//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();
if (mLoop != null) {
@ -100,8 +96,8 @@ public class Steampunk extends BaseWatchFace {
}
if (chart != null) {
highColor = ContextCompat.getColor(getApplicationContext(), R.color.light_highColor);
lowColor = ContextCompat.getColor(getApplicationContext(), R.color.light_lowColor);
highColor = ContextCompat.getColor(getApplicationContext(), R.color.black);
lowColor = ContextCompat.getColor(getApplicationContext(), R.color.black);
midColor = ContextCompat.getColor(getApplicationContext(), R.color.black);
gridColor = ContextCompat.getColor(getApplicationContext(), R.color.grey_steampunk);
basalBackgroundColor = ContextCompat.getColor(getApplicationContext(), R.color.basal_dark);
@ -124,14 +120,22 @@ public class Steampunk extends BaseWatchFace {
protected void setTextSizes() {
if (mUploaderBattery != null && mRigBattery != null) {
if (bIsRound) {
mUploaderBattery.setTextSize(13);
mRigBattery.setTextSize(13);
mCOB2.setTextSize(13);
mBasalRate.setTextSize(13);
mIOB2.setTextSize(12);
mTimestamp.setTextSize(12);
mLoop.setTextSize(12);
mUploaderBattery.setTextSize(11);
mRigBattery.setTextSize(11);
} else {
mUploaderBattery.setTextSize(12);
mRigBattery.setTextSize(12);
}
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:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:background="@drawable/steampunk_gauge"
android:orientation="vertical">
android:gravity="center"
android:orientation="vertical"
android:weightSum="1">
<ImageView
android:id="@+id/delta_gauge"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/steampunk_pointer"
android:id="@+id/delta_pointer"
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_gravity="center"
android:gravity="center"/>
android:layout_weight="0.69"
android:gravity="center"
android:src="@drawable/steampunk_pointer" />
</LinearLayout>
@ -57,17 +61,15 @@
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.11"
android:layout_weight="0.05"
android:gravity="center"
android:orientation="horizontal">
</LinearLayout>
android:orientation="horizontal"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.2"
android:layout_weight="0.26"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="1">
@ -77,106 +79,86 @@
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.2"
android:gravity="center" />
android:gravity="center"
android:textSize="11sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:orientation="horizontal">
<TextView
android:id="@+id/cobView"
android:layout_width="0px"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.2"
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="11sp"
android:textSize="13sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tmpBasal"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.2"
android:gravity="center"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="11sp"
android:textStyle="bold" />
<TextView
android:id="@+id/iobView"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.2"
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.2"
android:gravity="center" />
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:orientation="horizontal">
<TextView
android:id="@+id/tmpBasal"
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:paddingBottom="12dp"
android:text="-.--U/h"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="11sp"
android:textSize="13sp"
android:textStyle="bold" />
<TextView
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.1"
android:gravity="center" />
android:layout_weight="0.2"
android:orientation="horizontal">
<TextView
android:id="@+id/timestamp"
android:layout_width="0px"
android:id="@+id/iobView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.11"
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="11sp"
android:textSize="12sp"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.34"
android:gravity="center" />
android:layout_weight="0.2"
android:gravity="center"
android:textSize="11sp"
android:textStyle="bold" />
</LinearLayout>
@ -191,10 +173,9 @@
<LinearLayout
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.25"
android:orientation="horizontal">
</LinearLayout>
android:orientation="horizontal"/>
<lecho.lib.hellocharts.view.LineChartView
android:id="@+id/chart"
@ -204,10 +185,9 @@
<LinearLayout
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.25"
android:orientation="horizontal">
</LinearLayout>
android:orientation="horizontal"/>
</LinearLayout>
@ -215,7 +195,133 @@
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.03"
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>
@ -228,18 +334,48 @@
android:orientation="vertical">
</LinearLayout>
<ImageView
android:id="@+id/hour_hand"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/steampunk_hour_hand"
android:orientation="vertical"/>
android:layout_gravity="center"
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="match_parent"
android:layout_height="match_parent"
android:background="@drawable/steampunk_minute_hand"
android:orientation="vertical"/>
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>

View file

@ -26,16 +26,20 @@
android:id="@+id/secondary_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:background="@drawable/steampunk_gauge"
android:orientation="vertical">
android:gravity="center"
android:orientation="vertical"
android:weightSum="1">
<ImageView
android:id="@+id/delta_gauge"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/steampunk_pointer"
android:id="@+id/delta_pointer"
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_gravity="center"
android:gravity="center"/>
android:layout_weight="0.69"
android:gravity="center"
android:src="@drawable/steampunk_pointer" />
</LinearLayout>
@ -57,17 +61,15 @@
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.11"
android:layout_weight="0.05"
android:gravity="center"
android:orientation="horizontal">
</LinearLayout>
android:orientation="horizontal"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.2"
android:layout_weight="0.26"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="1">
@ -77,106 +79,86 @@
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.2"
android:gravity="center" />
android:gravity="center"
android:textSize="11sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:orientation="horizontal">
<TextView
android:id="@+id/cobView"
android:layout_width="0px"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.2"
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="11sp"
android:textSize="13sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tmpBasal"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.2"
android:gravity="center"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="11sp"
android:textStyle="bold" />
<TextView
android:id="@+id/iobView"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.2"
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.2"
android:gravity="center" />
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:orientation="horizontal">
<TextView
android:id="@+id/tmpBasal"
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:paddingBottom="12dp"
android:text="-.--U/h"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="11sp"
android:textSize="13sp"
android:textStyle="bold" />
<TextView
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.1"
android:gravity="center" />
android:layout_weight="0.2"
android:orientation="horizontal">
<TextView
android:id="@+id/timestamp"
android:layout_width="0px"
android:id="@+id/iobView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.11"
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="11sp"
android:textSize="12sp"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.34"
android:gravity="center" />
android:layout_weight="0.2"
android:gravity="center"
android:textSize="11sp"
android:textStyle="bold" />
</LinearLayout>
@ -191,10 +173,9 @@
<LinearLayout
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.25"
android:orientation="horizontal">
</LinearLayout>
android:orientation="horizontal"/>
<lecho.lib.hellocharts.view.LineChartView
android:id="@+id/chart"
@ -204,10 +185,9 @@
<LinearLayout
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.25"
android:orientation="horizontal">
</LinearLayout>
android:orientation="horizontal"/>
</LinearLayout>
@ -215,7 +195,133 @@
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.03"
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>
@ -228,18 +334,48 @@
android:orientation="vertical">
</LinearLayout>
<ImageView
android:id="@+id/hour_hand"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/steampunk_hour_hand"
android:orientation="vertical"/>
android:layout_gravity="center"
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="match_parent"
android:layout_height="match_parent"
android:background="@drawable/steampunk_minute_hand"
android:orientation="vertical"/>
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>