Added authorisation dialog - doesn't do anything yet, which is a shame considering how much code it took!
This commit is contained in:
@@ -9,18 +9,37 @@
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
tools:context="uk.org.openseizuredetector.LogManager">
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:text="Large Text"
|
||||
android:id="@+id/textView2"
|
||||
android:text="@string/not_authenticated"
|
||||
android:id="@+id/authStatusTv"
|
||||
/>
|
||||
<Button
|
||||
android:id="@+id/authenticate_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/authenticate" />
|
||||
|
||||
<!--
|
||||
<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>
|
||||
|
||||
52
app/src/main/res/layout/dialog_authenticate.xml
Normal file
52
app/src/main/res/layout/dialog_authenticate.xml
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<ImageView
|
||||
android:src="@drawable/star_of_life_24x24"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:scaleType="center"
|
||||
android:background="#FFFFBB33"
|
||||
android:contentDescription="@string/app_name" />
|
||||
<EditText
|
||||
android:id="@+id/username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:hint="username" />
|
||||
<EditText
|
||||
android:id="@+id/password"
|
||||
android:inputType="textPassword"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:fontFamily="sans-serif"
|
||||
android:hint="password"/>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<Button
|
||||
android:id="@+id/cancelBtn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/cancel" />
|
||||
<Button
|
||||
android:id="@+id/OKBtn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/authenticate" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -46,6 +46,13 @@
|
||||
android:showAsAction="never|withText"
|
||||
android:title="Test SMS Alarm Notification" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_logmanager"
|
||||
android:icon="@drawable/ic_action_settings"
|
||||
android:showAsAction="never|withText"
|
||||
android:title="Data Log Manager"
|
||||
android:enabled="true"
|
||||
/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_logs"
|
||||
|
||||
@@ -2,4 +2,7 @@
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="fragment_horizontal_margin">16dp</dimen>
|
||||
<dimen name="fragment_vertical_margin">16dp</dimen>
|
||||
</resources>
|
||||
|
||||
@@ -79,4 +79,16 @@
|
||||
<string name="CancelAudibleAlarms">Cancel Audible Alarms (temporarily)</string>
|
||||
<string name="AudibleAlarmsOff">Audible Alarms OFF</string>
|
||||
<string name="Fault">FAULT</string>
|
||||
<string name="authenticate">Authenticate</string>
|
||||
<string name="not_authenticated">Not Authenticated</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<!-- Strings related to login -->
|
||||
<string name="prompt_email">Email</string>
|
||||
<string name="prompt_password">Password</string>
|
||||
<string name="action_sign_in">Sign in or register</string>
|
||||
<string name="action_sign_in_short">Sign in</string>
|
||||
<string name="welcome">"Welcome!"</string>
|
||||
<string name="invalid_username">Not a valid username</string>
|
||||
<string name="invalid_password">Password must be >5 characters</string>
|
||||
<string name="login_failed">"Login failed"</string>
|
||||
</resources>
|
||||
|
||||
59
app/src/main/res/xml/logmanager_prefs.xml
Normal file
59
app/src/main/res/xml/logmanager_prefs.xml
Normal file
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<EditTextPreference
|
||||
android:defaultValue="https://osd.dynu.net/"
|
||||
android:key="serverUrl"
|
||||
android:title="Server URL"
|
||||
android:summary="URL of OpenSeizureDetector Data Log Server"
|
||||
/>
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:key="LogToServer"
|
||||
android:summary="Log Data to OpenSeizureDetector Server"
|
||||
android:title="Log to Server" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="UploadOverMobileNetwork"
|
||||
android:summary="Upload Data when using Mobile Network"
|
||||
android:title="Use Mobile Network" />
|
||||
<EditTextPreference
|
||||
android:defaultValue="password"
|
||||
android:key="OSDPasswd"
|
||||
android:summary="Password for remote data logging."
|
||||
android:title="Remote Password" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="PreventSleep"
|
||||
android:summary="Prevent the screen from blanking while the application is running."
|
||||
android:title="Prevent the screen from blanking." />
|
||||
<EditTextPreference
|
||||
android:defaultValue="1000"
|
||||
android:key="UpdatePeriod"
|
||||
android:summary="Display update period in miliseconds."
|
||||
android:title="Display Update Period (ms)." />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="AutoStart"
|
||||
android:summary="Auto Start App on Boot"
|
||||
android:title="Auto Start App on Boot"
|
||||
android:enabled="true"
|
||||
/>
|
||||
|
||||
<EditTextPreference
|
||||
android:defaultValue=""
|
||||
android:key="AppVersionName"
|
||||
android:summary="App Version Number - used to decide whether to display the welcome message or not."
|
||||
android:title="App Version Number" />
|
||||
<!--
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="UseIpCamera"
|
||||
android:summary="Use IP Camera to View Images"
|
||||
android:title="Enable IP Camera"
|
||||
android:enabled="false"
|
||||
/>
|
||||
-->
|
||||
|
||||
|
||||
</PreferenceScreen>
|
||||
Reference in New Issue
Block a user