run rendering calculations on background

This commit is contained in:
Milos Kozak 2017-06-05 15:16:07 +02:00
parent 88b9caa357
commit e0a6db22a2
7 changed files with 787 additions and 667 deletions

View file

@ -212,9 +212,6 @@ public class ActionsFragment extends Fragment implements View.OnClickListener {
@Override @Override
public void run() { public void run() {
DanaRv2Plugin danaRv2Plugin = (DanaRv2Plugin) MainApp.getSpecificPlugin(DanaRv2Plugin.class); DanaRv2Plugin danaRv2Plugin = (DanaRv2Plugin) MainApp.getSpecificPlugin(DanaRv2Plugin.class);
if (MainApp.getConfigBuilder().isTempBasalInProgress()) {
danaRv2Plugin.cancelTempBasal();
}
danaRv2Plugin.setHighTempBasalPercent(50); danaRv2Plugin.setHighTempBasalPercent(50);
} }
}); });
@ -224,9 +221,6 @@ public class ActionsFragment extends Fragment implements View.OnClickListener {
@Override @Override
public void run() { public void run() {
DanaRv2Plugin danaRv2Plugin = (DanaRv2Plugin) MainApp.getSpecificPlugin(DanaRv2Plugin.class); DanaRv2Plugin danaRv2Plugin = (DanaRv2Plugin) MainApp.getSpecificPlugin(DanaRv2Plugin.class);
if (MainApp.getConfigBuilder().isTempBasalInProgress()) {
danaRv2Plugin.cancelTempBasal();
}
danaRv2Plugin.setHighTempBasalPercent(400); danaRv2Plugin.setHighTempBasalPercent(400);
} }
}); });

View file

@ -294,10 +294,30 @@
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical"> android:orientation="vertical">
<com.jjoe64.graphview.GraphView <RelativeLayout
android:id="@+id/overview_bggraph" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="wrap_content">
android:layout_height="160dip" />
<com.jjoe64.graphview.GraphView
android:id="@+id/overview_bggraph"
android:layout_width="wrap_content"
android:layout_height="160dip"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true" />
<TextView
android:id="@+id/overview_updating"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerInParent="true"
android:layout_centerVertical="true"
android:text="@string/updating"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/updating"
android:textStyle="bold" />
</RelativeLayout>
<com.jjoe64.graphview.GraphView <com.jjoe64.graphview.GraphView
android:id="@+id/overview_iobgraph" android:id="@+id/overview_iobgraph"

View file

@ -294,10 +294,30 @@
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical"> android:orientation="vertical">
<com.jjoe64.graphview.GraphView <RelativeLayout
android:id="@+id/overview_bggraph" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="wrap_content">
android:layout_height="160dip" />
<com.jjoe64.graphview.GraphView
android:id="@+id/overview_bggraph"
android:layout_width="wrap_content"
android:layout_height="160dip"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true" />
<TextView
android:id="@+id/overview_updating"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerInParent="true"
android:layout_centerVertical="true"
android:text="@string/updating"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/updating"
android:textStyle="bold" />
</RelativeLayout>
<com.jjoe64.graphview.GraphView <com.jjoe64.graphview.GraphView
android:id="@+id/overview_iobgraph" android:id="@+id/overview_iobgraph"

View file

@ -503,11 +503,30 @@
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical"> android:orientation="vertical">
<com.jjoe64.graphview.GraphView <RelativeLayout
android:id="@+id/overview_bggraph" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="wrap_content">
android:layout_height="0dp"
android:layout_weight="1" /> <com.jjoe64.graphview.GraphView
android:id="@+id/overview_bggraph"
android:layout_width="wrap_content"
android:layout_height="160dip"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true" />
<TextView
android:id="@+id/overview_updating"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerInParent="true"
android:layout_centerVertical="true"
android:text="@string/updating"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/updating"
android:textStyle="bold" />
</RelativeLayout>
<com.jjoe64.graphview.GraphView <com.jjoe64.graphview.GraphView
android:id="@+id/overview_iobgraph" android:id="@+id/overview_iobgraph"

View file

@ -11,6 +11,7 @@
<color name="tabBgColor">#f0003f59</color> <color name="tabBgColor">#f0003f59</color>
<color name="tabBgColorSelected">#FF33B5E5</color> <color name="tabBgColorSelected">#FF33B5E5</color>
<color name="deviations">#FF0000</color> <color name="deviations">#FF0000</color>
<color name="updating">#50ffffff</color>
<color name="defaultbackground">#424242</color> <color name="defaultbackground">#424242</color>

View file

@ -625,4 +625,5 @@
<string name="invalidprofile">Invalid profile !!!</string> <string name="invalidprofile">Invalid profile !!!</string>
<string name="profileswitch">ProfileSwitch</string> <string name="profileswitch">ProfileSwitch</string>
<string name="careportal_pbage_label">Pump battery age</string> <string name="careportal_pbage_label">Pump battery age</string>
<string name="updating">Updating ...</string>
</resources> </resources>