large bg delta in tablet mode
This commit is contained in:
parent
a5d9d25564
commit
e100e5abae
4 changed files with 30 additions and 10 deletions
|
@ -579,6 +579,8 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
||||||
|
|
||||||
val glucoseStatus = GlucoseStatus(injector).glucoseStatusData
|
val glucoseStatus = GlucoseStatus(injector).glucoseStatusData
|
||||||
if (glucoseStatus != null) {
|
if (glucoseStatus != null) {
|
||||||
|
overview_delta_large?.text = Profile.toSignedUnitsString(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units)
|
||||||
|
overview_delta_large?.setTextColor(color)
|
||||||
overview_delta?.text = Profile.toSignedUnitsString(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units)
|
overview_delta?.text = Profile.toSignedUnitsString(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units)
|
||||||
overview_avgdelta?.text = "${Profile.toSignedUnitsString(glucoseStatus.short_avgdelta, glucoseStatus.short_avgdelta * Constants.MGDL_TO_MMOLL, units)}\n${Profile.toSignedUnitsString(glucoseStatus.long_avgdelta, glucoseStatus.long_avgdelta * Constants.MGDL_TO_MMOLL, units)}"
|
overview_avgdelta?.text = "${Profile.toSignedUnitsString(glucoseStatus.short_avgdelta, glucoseStatus.short_avgdelta * Constants.MGDL_TO_MMOLL, units)}\n${Profile.toSignedUnitsString(glucoseStatus.long_avgdelta, glucoseStatus.long_avgdelta * Constants.MGDL_TO_MMOLL, units)}"
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -771,7 +771,7 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
||||||
|
|
||||||
@SuppressWarnings("UNCHECKED")
|
@SuppressWarnings("UNCHECKED")
|
||||||
private void executeTask(AsyncTask task, DataMap... parameters) {
|
private void executeTask(AsyncTask task, DataMap... parameters) {
|
||||||
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, parameters);
|
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Object) parameters);
|
||||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
||||||
// task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
// task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
// } else {
|
// } else {
|
||||||
|
|
|
@ -51,7 +51,7 @@ interface SkinInterface {
|
||||||
asLayoutParams.topToTop = ConstraintLayout.LayoutParams.PARENT_ID
|
asLayoutParams.topToTop = ConstraintLayout.LayoutParams.PARENT_ID
|
||||||
|
|
||||||
if (isTablet) {
|
if (isTablet) {
|
||||||
for (v in listOf<TextView>(
|
for (v in listOf<TextView?>(
|
||||||
view.overview_bg,
|
view.overview_bg,
|
||||||
view.overview_time,
|
view.overview_time,
|
||||||
view.overview_timeagoshort,
|
view.overview_timeagoshort,
|
||||||
|
@ -60,8 +60,8 @@ interface SkinInterface {
|
||||||
view.overview_basebasal,
|
view.overview_basebasal,
|
||||||
view.overview_extendedbolus,
|
view.overview_extendedbolus,
|
||||||
view.overview_sensitivity
|
view.overview_sensitivity
|
||||||
)) v.setTextSize(COMPLEX_UNIT_PX, v.textSize * 1.5f)
|
)) v?.setTextSize(COMPLEX_UNIT_PX, v.textSize * 1.5f)
|
||||||
for (v in listOf<TextView>(
|
for (v in listOf<TextView?>(
|
||||||
view.overview_pump,
|
view.overview_pump,
|
||||||
view.overview_openaps,
|
view.overview_openaps,
|
||||||
view.overview_uploader,
|
view.overview_uploader,
|
||||||
|
@ -72,9 +72,13 @@ interface SkinInterface {
|
||||||
view.careportal_sensorage,
|
view.careportal_sensorage,
|
||||||
view.careportal_pbage,
|
view.careportal_pbage,
|
||||||
view.careportal_batterylevel
|
view.careportal_batterylevel
|
||||||
)) v.setTextSize(COMPLEX_UNIT_PX, v.textSize * 1.3f)
|
)) v?.setTextSize(COMPLEX_UNIT_PX, v.textSize * 1.3f)
|
||||||
view.overview_time_llayout.orientation = LinearLayout.HORIZONTAL
|
view.overview_time_llayout?.orientation = LinearLayout.HORIZONTAL
|
||||||
view.overview_timeagoshort.setTextSize(COMPLEX_UNIT_PX, view.overview_time.textSize)
|
view.overview_timeagoshort?.setTextSize(COMPLEX_UNIT_PX, view.overview_time.textSize)
|
||||||
|
|
||||||
|
view.overview_delta_large?.visibility = View.VISIBLE
|
||||||
|
} else {
|
||||||
|
view.overview_delta_large?.visibility = View.GONE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,11 +13,25 @@
|
||||||
android:text="00.0"
|
android:text="00.0"
|
||||||
android:textSize="60sp"
|
android:textSize="60sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/overview_arrow"
|
app:layout_constraintEnd_toStartOf="@+id/overview_delta_large"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/overview_delta_large"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="(+1.0)"
|
||||||
|
android:textSize="60sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/overview_bg"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/overview_arrow"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/overview_bg"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/overview_bg" />
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/overview_arrow"
|
android:id="@+id/overview_arrow"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -25,8 +39,8 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/overview_deltas_llayout"
|
app:layout_constraintEnd_toStartOf="@+id/overview_deltas_llayout"
|
||||||
app:layout_constraintHorizontal_bias="0.0"
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
app:layout_constraintStart_toEndOf="@+id/overview_bg"
|
app:layout_constraintStart_toEndOf="@+id/overview_delta_large"
|
||||||
app:layout_constraintTop_toTopOf="@+id/overview_bg"
|
app:layout_constraintTop_toTopOf="@+id/overview_delta_large"
|
||||||
android:paddingTop="18dp"
|
android:paddingTop="18dp"
|
||||||
app:srcCompat="@drawable/ic_flat" />
|
app:srcCompat="@drawable/ic_flat" />
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue