Simplified data log manager using radio button to select and deselect different parts of the UI
This commit is contained in:
@@ -49,74 +49,109 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="000" />
|
||||
</LinearLayout>
|
||||
|
||||
<!--
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<Button
|
||||
android:id="@+id/pruneDatabaseBtn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Prune Database" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/reportSeizureBtn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Report Seizure" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/EventsInLocalDb"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
|
||||
<ListView
|
||||
android:id="@+id/eventLogListView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="150dp"
|
||||
android:layout_marginTop="10dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/remote_database"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/remoteEventsLv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="150dp"
|
||||
android:layout_marginTop="10dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/authStatusTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/not_authenticated" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/auth_button"
|
||||
android:id="@+id/pruneDatabaseBtn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/authenticate" />
|
||||
android:text="@string/prune_database" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/reportSeizureBtn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/report_seizure" />
|
||||
</LinearLayout>
|
||||
-->
|
||||
<RadioGroup xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/shared_data_rb"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="true"
|
||||
android:onClick="onRadioButtonClicked"
|
||||
android:text="@string/shared_data" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/local_data_rb"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:onClick="onRadioButtonClicked"
|
||||
android:text="@string/local_data" />
|
||||
</RadioGroup>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/local_data_ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/EventsInLocalDb"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/eventLogListView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="150dp"
|
||||
android:layout_marginTop="10dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/refresh_button"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:visibility="visible"
|
||||
android:id="@+id/shared_data_ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/refreshBtn" />
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/remote_database"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/remoteEventsLv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="150dp"
|
||||
android:layout_marginTop="10dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/authStatusTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/not_authenticated" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/auth_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/authenticate" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/refresh_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/refreshBtn" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
26
app/src/main/res/menu/log_manager_activity_menu.xml
Normal file
26
app/src/main/res/menu/log_manager_activity_menu.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<group android:id="@+id/grp1">
|
||||
<item
|
||||
android:id="@+id/pruneDatabaseMenuItem"
|
||||
android:showAsAction="never|withText"
|
||||
android:title="@string/prune_database" />
|
||||
</group>
|
||||
|
||||
<group android:id="@+id/grp3">
|
||||
<item
|
||||
android:id="@+id/action_report_seizure"
|
||||
android:enabled="true"
|
||||
android:icon="@drawable/ic_action_settings"
|
||||
android:showAsAction="never|withText"
|
||||
android:title="@string/report_seizure" />
|
||||
|
||||
|
||||
<item
|
||||
android:id="@+id/action_authenticate_api"
|
||||
android:enabled="true"
|
||||
android:icon="@drawable/ic_action_settings"
|
||||
android:showAsAction="never|withText"
|
||||
android:title="@string/data_sharing_log_in" />
|
||||
|
||||
</group>
|
||||
</menu>
|
||||
@@ -294,7 +294,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 with Token</string>
|
||||
<string name="local_database">Data on Phone</string>
|
||||
<string name="local_database">Logged Data 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>
|
||||
@@ -343,4 +343,7 @@
|
||||
<string name="error_connecting_to_server">Error Connecting to Server</string>
|
||||
<string name="battery_usage_optimisation_dialog_title">WARNING: Battery Usage Optimisation</string>
|
||||
<string name="battery_usage_optimisation_dialog_text">WARNING: The Android System Battery Optimisation Settings are configured to \'Optimise\' OpenSeizureDetector. This means it is likely to be shutdown when operating on battery power, so will not work correctly\n\nPlease go into the Phone Settings and search for \'Optimise Battery Usage\' and ensure that OpenSeizureDetector is NOT optimised</string>
|
||||
<string name="local_data">Local Data</string>
|
||||
<string name="shared_data">Shared Data</string>
|
||||
<string name="prune_database">Prune Database</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user