Add headers to dialogs.

This commit is contained in:
Johannes Mockenhaupt 2017-11-21 00:21:56 +01:00
parent 75855f3f05
commit 1b50b43fbb
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
5 changed files with 70 additions and 12 deletions

View file

@ -1,6 +1,7 @@
- [ ] Bugs - [ ] Bugs
- [ ] Taking over benign warnings on connect doesn't work properly - [ ] Taking over benign warnings on connect doesn't work properly
(Notification raised but not confirmed?) (Notification raised but not confirmed?)
- [ ] Reading full history multiple times duplicates entries shown in Stats/TDD dialog
- [x] ruffy: Accessing the quick info menu yields noMenu when cartridge is low - [x] ruffy: Accessing the quick info menu yields noMenu when cartridge is low
- [x] ruffy: Multi-digit error codes in error history aren't supported - [x] ruffy: Multi-digit error codes in error history aren't supported
- [-] No connection can be established anymore; ruffy issue i can't solve - [-] No connection can be established anymore; ruffy issue i can't solve

View file

@ -226,6 +226,7 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
} }
CommandResult commandResult = runCommand(MainApp.sResources.getString(R.string.combo_activity_setting_basal_profile), 2, CommandResult commandResult = runCommand(MainApp.sResources.getString(R.string.combo_activity_setting_basal_profile), 2,
() -> ruffyScripter.setBasalProfile(basalProfile)); () -> ruffyScripter.setBasalProfile(basalProfile));
// Note: no verification here, command checks summary of inputs (total basal) at the end
return commandResult.success ? PumpInterface.SUCCESS : PumpInterface.FAILED;*/ return commandResult.success ? PumpInterface.SUCCESS : PumpInterface.FAILED;*/
} }

View file

@ -4,6 +4,32 @@
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".plugins.PumpCombo.ComboFragment"> tools:context=".plugins.PumpCombo.ComboFragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:layout_marginTop="5dp"
android:text="Alerts"
android:textStyle="bold" />
<View
android:id="@+id/profileview_datedelimiter"
android:layout_width="match_parent"
android:layout_height="2dip"
android:layout_marginBottom="5dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="5dp"
android:background="@color/listdelimiter" />
<ScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -24,4 +50,6 @@
</ScrollView> </ScrollView>
</LinearLayout>
</FrameLayout> </FrameLayout>

View file

@ -4,6 +4,31 @@
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".plugins.PumpCombo.ComboFragment"> tools:context=".plugins.PumpCombo.ComboFragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:layout_marginTop="5dp"
android:text="TDD"
android:textStyle="bold" />
<View
android:id="@+id/profileview_datedelimiter"
android:layout_width="match_parent"
android:layout_height="2dip"
android:layout_marginBottom="5dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="5dp"
android:background="@color/listdelimiter" />
<ScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -17,11 +42,14 @@
android:id="@+id/combo_tdd_history_text" android:id="@+id/combo_tdd_history_text"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAlignment="textStart" android:gravity="start"
android:padding="10dp" android:padding="10dp"
android:gravity="start"/> android:textAlignment="textStart" />
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
</LinearLayout>
</FrameLayout> </FrameLayout>

View file

@ -19,7 +19,7 @@ public class Tdd extends HistoryRecord {
Tdd tdd = (Tdd) o; Tdd tdd = (Tdd) o;
if (timestamp != tdd.timestamp) return false; if (timestamp != tdd.timestamp) return false;
return Math.abs(tdd.total - total) <= 0.05; return tdd.total != total;
} }
@Override @Override