Added user interface for NDA logging (menu in data log manager)

This commit is contained in:
Graham Jones
2022-10-25 20:21:46 +01:00
parent cc58c0995a
commit b27653dcbb
6 changed files with 178 additions and 32 deletions

View File

@@ -49,6 +49,25 @@
android:layout_height="wrap_content"
android:text="000" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/NDATimeRemaining" />
<TextView
android:id="@+id/nda_time_remaining_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="000" />
</LinearLayout>
<RadioGroup xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -80,22 +99,23 @@
</RadioGroup>
<LinearLayout
android:visibility="visible"
android:id="@+id/shared_data_ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="vertical"
android:visibility="visible">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/remote_database"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/check_seizures_message"
/>
android:text="@string/check_seizures_message" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -112,24 +132,36 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/authenticate" />
<Button
android:id="@+id/refresh_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/refreshBtn" />
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/remoteAccessPb" />
<ProgressBar
android:id="@+id/remoteAccessPb"
android:layout_width="wrap_content"
android:layout_height="match_parent" />
</LinearLayout>
<CheckBox
android:id="@+id/include_warnings_cb"
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/include_warnings">
</CheckBox>
android:orientation="horizontal">
<CheckBox
android:id="@+id/include_warnings_cb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/include_warnings"></CheckBox>
<CheckBox
android:id="@+id/include_nda_cb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/include_nda"></CheckBox>
</LinearLayout>
<ListView
android:id="@+id/remoteEventsLv"
@@ -141,11 +173,11 @@
<LinearLayout
android:visibility="gone"
android:id="@+id/local_data_ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="vertical"
android:visibility="gone">
<TextView
android:layout_width="fill_parent"
@@ -161,11 +193,11 @@
</LinearLayout>
<LinearLayout
android:visibility="gone"
android:id="@+id/syslog_ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="vertical"
android:visibility="gone">
<TextView
android:layout_width="fill_parent"

View File

@@ -27,5 +27,12 @@
app:showAsAction="never|withText"
android:title="@string/data_sharing_log_in" />
<item
android:id="@+id/start_stop_nda"
android:enabled="true"
android:icon="@drawable/ic_action_settings"
app:showAsAction="never|withText"
android:title="@string/start_nda" />
</group>
</menu>

View File

@@ -312,7 +312,7 @@
<string name="title_activity_authenticate">Log in to OpenSeizureDetector Data Sharing</string>
<string name="logout">Log Out</string>
<string name="logged_in_with_token">Logged in to\nData Sharing</string>
<string name="local_database">Logged Data Manager</string>
<string name="local_database">Data Sharing Manager</string>
<string name="remote_database">Shared Data</string>
<string name="num_local_events">Number of Events Stored on Phone: </string>
<string name="num_local_datapoints">"Number of Datapoints Stored on Phone: "</string>
@@ -441,4 +441,15 @@
<string name="LogNDASummary">Continuously log data to the data sharing system to provide background \'normal daily activity\' data to help reduce false alarms.</string>
<string name="LogNDATitle">Log Normal Daily Activities (NDA)</string>
<string name="NDATimerStartTimeParseError">Error Parsing NDATimerStartTime</string>
<string name="include_nda">Include NDA</string>
<string name="start_nda">Start NDA Logging</string>
<string name="stop_nda">Stop NDA Logging</string>
<string name="stop_nda_logging_dialog_title">Stop NDA Logging?</string>
<string name="stop_nda_logging_dialog_meassage">Stop Normal Daily Activity (NDA) Logging?</string>
<string name="start_nda_logging_dialog_title">Start NDA Logging?</string>
<string name="start_nda_logging_dialog_meassage">Start Normal Daily Activity (NDA) Logging (will stop automatically after 24 hours)?</string>
<string name="NDATimeRemaining">"NDA Logging Time Remaining (hours): "</string>
<string name="stop_nda_menu_title">Stop NDA</string>
<string name="start_nda_menu_title">Start NDA</string>
</resources>