Simplified data log manager using radio button to select and deselect different parts of the UI

This commit is contained in:
Graham Jones
2022-02-05 22:31:28 +00:00
parent 4fb83d04c9
commit b53e646cb5
4 changed files with 243 additions and 62 deletions

View File

@@ -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>