Added LogManagerControl activity to view and control the status of the LogManager

This commit is contained in:
Graham Jones
2022-01-05 18:03:46 +00:00
parent 93c0fc91cc
commit 8a2bbd1cfb
8 changed files with 321 additions and 14 deletions

View File

@@ -0,0 +1,98 @@
<?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:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="uk.org.openseizuredetector.LogManager">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/local_database"
/>
<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/num_local_events"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="000"
android:id="@+id/num_local_events_tv"
/>
</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/num_local_datapoints"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="000"
android:id="@+id/num_local_datapoints_tv"
/>
</LinearLayout>
<Button
android:id="@+id/pruneDatabaseBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Prune Database" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/remote_database"
/>
<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/not_authenticated"
android:id="@+id/authStatusTv"
/>
<Button
android:id="@+id/auth_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/authenticate" />
</LinearLayout>
<!--
<ListView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/eventLogListView"
android:layout_marginTop="97dp" />
<EditText
android:id="@+id/editText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="10"
android:inputType="textPersonName"
android:text="Name" />
-->
</LinearLayout>

View File

@@ -54,7 +54,7 @@
android:title="@string/test_phone_alarm_notification" />
<item
android:enabled="false"
android:enabled="true"
android:id="@+id/action_logmanager"
android:icon="@drawable/ic_action_settings"
android:showAsAction="never|withText"

View File

@@ -294,4 +294,8 @@
<string name="title_activity_authenticate">AuthenticateActivity</string>
<string name="logout">Log Out</string>
<string name="logged_in_with_token">Logged in with Token:</string>
<string name="local_database">Local Database</string>
<string name="remote_database">Remote Database</string>
<string name="num_local_events">Number of Stored Events: </string>
<string name="num_local_datapoints">"Number of Stored Datapoints: "</string>
</resources>