Added 'Report Seizure' activity. UI seems to work, but database part that looks for the closest datapoint is not working.
This commit is contained in:
109
app/src/main/res/layout/activity_report_seizure.xml
Normal file
109
app/src/main/res/layout/activity_report_seizure.xml
Normal file
@@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
tools:context="uk.org.openseizuredetector.LogManager">
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/report_seizure"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<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/date" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="dd"
|
||||
android:id="@+id/date_day_tv"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="/"
|
||||
android:enabled = "false"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="mm"
|
||||
android:id="@+id/date_mon_tv"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="/"
|
||||
android:enabled = "false"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="yyyy"
|
||||
android:id="@+id/date_year_tv"/>
|
||||
<Button
|
||||
android:id="@+id/select_date_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/select_date" />
|
||||
</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/time" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="hh"
|
||||
android:id="@+id/time_hh_tv"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=":"
|
||||
android:enabled = "false"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="mm"
|
||||
android:id="@+id/time_mm_tv"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/select_time_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/select_time" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<Button
|
||||
android:id="@+id/OKBtn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/okBtnTxt" />
|
||||
<Button
|
||||
android:id="@+id/cancelBtn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/cancelBtnTxt" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -53,6 +53,14 @@
|
||||
android:showAsAction="never|withText"
|
||||
android:title="@string/test_phone_alarm_notification" />
|
||||
|
||||
<item
|
||||
android:enabled="true"
|
||||
android:id="@+id/action_report_seizure"
|
||||
android:icon="@drawable/ic_action_settings"
|
||||
android:showAsAction="never|withText"
|
||||
android:title="@string/report_seizure"
|
||||
/>
|
||||
|
||||
<item
|
||||
android:enabled="true"
|
||||
android:id="@+id/action_logmanager"
|
||||
|
||||
@@ -299,4 +299,10 @@
|
||||
<string name="num_local_events">Number of Stored Events: </string>
|
||||
<string name="num_local_datapoints">"Number of Stored Datapoints: "</string>
|
||||
<string name="view_remote_db_btn">View Remote DB Data</string>
|
||||
<string name="report_seizure">Report Seizure</string>
|
||||
<string name="date">"Date: "</string>
|
||||
<string name="select_date">Select Date</string>
|
||||
<string name="time">"Time: "</string>
|
||||
<string name="cancelBtnTxt">Cancel</string>
|
||||
<string name="select_time">Select Time</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user