EmergencyInfo V1 App code
Bug: 23591361
Change-Id: I4a973ad0a50cc4a39c2e4c84bd7a8f772cc3f359
diff --git a/res/xml/emergency_info.xml b/res/xml/emergency_info.xml
new file mode 100644
index 0000000..7d94466
--- /dev/null
+++ b/res/xml/emergency_info.xml
@@ -0,0 +1,59 @@
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <!-- NOTE: Hide buttons to simplify the UI. Users can touch outside the dialog to
+ dismiss it. -->
+ <!-- NOTE: ListPreference's summary should be set to its value by the activity code. -->
+ <ListPreference
+ android:defaultValue="-1"
+ android:entries="@array/blood_type_values"
+ android:entryValues="@array/blood_type_values"
+ android:key="blood_type"
+ android:negativeButtonText="@null"
+ android:positiveButtonText="@null"
+ android:summary="@string/default_summary"
+ android:title="@string/blood_type" />
+
+ <!-- NOTE: EditTextPreference accepts EditText attributes. -->
+ <!-- NOTE: EditTextPreference's summary should be set to its value by the activity code. -->
+ <EditTextPreference
+ android:capitalize="sentences"
+ android:inputType="textCapWords"
+ android:key="allergies"
+ android:maxLines="1"
+ android:selectAllOnFocus="true"
+ android:singleLine="true"
+ android:summary="@string/default_summary"
+ android:title="@string/allergies" />
+
+ <EditTextPreference
+ android:capitalize="sentences"
+ android:inputType="textCapWords"
+ android:key="medications"
+ android:maxLines="1"
+ android:selectAllOnFocus="true"
+ android:singleLine="true"
+ android:summary="@string/default_summary"
+ android:title="@string/medications" />
+
+ <EditTextPreference
+ android:capitalize="sentences"
+ android:inputType="textCapWords"
+ android:key="medical_conditions"
+ android:maxLines="1"
+ android:selectAllOnFocus="true"
+ android:singleLine="false"
+ android:title="@string/medical_conditions" />
+ <PreferenceCategory android:key="emergency_contacts" android:title="Emergency contacts">
+ </PreferenceCategory>
+
+ <PreferenceCategory android:key="debug" android:title="Debug">
+ <Preference
+ android:title="@string/readonly_title"
+ android:key="readonly"
+ >
+ <intent android:action="android.telephony.action.EMERGENCY_ASSISTANCE" />
+ </Preference>
+ </PreferenceCategory>
+
+
+</PreferenceScreen>