Adding initial app framework
Change-Id: I0c53e3487eb3be1eefa2d0c7f260a90d82fd8844
diff --git a/app/src/main/res/xml/pref_data_sync.xml b/app/src/main/res/xml/pref_data_sync.xml
new file mode 100644
index 0000000..ffda831
--- /dev/null
+++ b/app/src/main/res/xml/pref_data_sync.xml
@@ -0,0 +1,21 @@
+<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:key="sync_frequency"
+ android:title="@string/pref_title_sync_frequency"
+ android:entries="@array/pref_sync_frequency_titles"
+ android:entryValues="@array/pref_sync_frequency_values"
+ android:defaultValue="180"
+ android:negativeButtonText="@null"
+ android:positiveButtonText="@null" />
+
+ <!-- This preference simply launches an intent when selected. Use this UI sparingly, per
+ design guidelines. -->
+ <Preference android:title="@string/pref_title_system_sync_settings">
+ <intent android:action="android.settings.SYNC_SETTINGS" />
+ </Preference>
+
+</PreferenceScreen>
diff --git a/app/src/main/res/xml/pref_general.xml b/app/src/main/res/xml/pref_general.xml
new file mode 100644
index 0000000..c49cbed
--- /dev/null
+++ b/app/src/main/res/xml/pref_general.xml
@@ -0,0 +1,33 @@
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <CheckBoxPreference
+ android:key="example_checkbox"
+ android:title="@string/pref_title_social_recommendations"
+ android:summary="@string/pref_description_social_recommendations"
+ android:defaultValue="true" />
+
+ <!-- NOTE: EditTextPreference accepts EditText attributes. -->
+ <!-- NOTE: EditTextPreference's summary should be set to its value by the activity code. -->
+ <EditTextPreference
+ android:key="example_text"
+ android:title="@string/pref_title_display_name"
+ android:defaultValue="@string/pref_default_display_name"
+ android:selectAllOnFocus="true"
+ android:inputType="textCapWords"
+ android:capitalize="words"
+ android:singleLine="true"
+ android:maxLines="1" />
+
+ <!-- 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:key="example_list"
+ android:title="@string/pref_title_add_friends_to_messages"
+ android:defaultValue="-1"
+ android:entries="@array/pref_example_list_titles"
+ android:entryValues="@array/pref_example_list_values"
+ android:negativeButtonText="@null"
+ android:positiveButtonText="@null" />
+
+</PreferenceScreen>
diff --git a/app/src/main/res/xml/pref_headers.xml b/app/src/main/res/xml/pref_headers.xml
new file mode 100644
index 0000000..f2af3f2
--- /dev/null
+++ b/app/src/main/res/xml/pref_headers.xml
@@ -0,0 +1,17 @@
+<preference-headers xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <!-- These settings headers are only used on tablets. -->
+
+ <header
+ android:fragment="nfd.named_data.net.nfd.NfdSettingsActivity$GeneralPreferenceFragment"
+ android:title="@string/pref_header_general"/>
+
+ <header
+ android:fragment="nfd.named_data.net.nfd.NfdSettingsActivity$NotificationPreferenceFragment"
+ android:title="@string/pref_header_notifications"/>
+
+ <header
+ android:fragment="nfd.named_data.net.nfd.NfdSettingsActivity$DataSyncPreferenceFragment"
+ android:title="@string/pref_header_data_sync"/>
+
+</preference-headers>
diff --git a/app/src/main/res/xml/pref_notification.xml b/app/src/main/res/xml/pref_notification.xml
new file mode 100644
index 0000000..b4b8cae
--- /dev/null
+++ b/app/src/main/res/xml/pref_notification.xml
@@ -0,0 +1,27 @@
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <!-- A 'parent' preference, which enables/disables child preferences (below)
+ when checked/unchecked. -->
+ <CheckBoxPreference
+ android:key="notifications_new_message"
+ android:title="@string/pref_title_new_message_notifications"
+ android:defaultValue="true" />
+
+ <!-- Allows the user to choose a ringtone in the 'notification' category. -->
+ <!-- NOTE: This preference will be enabled only when the checkbox above is checked. -->
+ <!-- NOTE: RingtonePreference's summary should be set to its value by the activity code. -->
+ <RingtonePreference
+ android:dependency="notifications_new_message"
+ android:key="notifications_new_message_ringtone"
+ android:title="@string/pref_title_ringtone"
+ android:ringtoneType="notification"
+ android:defaultValue="content://settings/system/notification_sound" />
+
+ <!-- NOTE: This preference will be enabled only when the checkbox above is checked. -->
+ <CheckBoxPreference
+ android:dependency="notifications_new_message"
+ android:key="notifications_new_message_vibrate"
+ android:title="@string/pref_title_vibrate"
+ android:defaultValue="true" />
+
+</PreferenceScreen>