Preference acitivty

This commit is contained in:
danijoo
2015-12-31 16:43:48 +01:00
parent e27dc19b26
commit 209810bca5
12 changed files with 180 additions and 12 deletions

View File

@@ -1,15 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
android:layout_height="match_parent">
<android.support.v7.widget.Toolbar
android:background="?attr/colorPrimary"
android:id="@+id/toolbar"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" />
<include layout="@layout/toolbar" />
</FrameLayout>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/toolbar" />
<FrameLayout
android:id="@+id/fragment_holder"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:elevation="?attr/elevation"
android:background="?attr/colorPrimary"
android:id="@+id/toolbar"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" />

View File

@@ -1,4 +1,16 @@
<resources>
<string name="app_name">Notification Logger</string>
<string name="menu_item_settings">Settings</string>
<string name="title_settings">Settings</string>
<string name="pref_category_notification_settings">Notification Settings</string>
<string name="pref_category_support">Support</string>
<string name="pref_logging_enabled_title">Notification Logging</string>
<string name="pref_logging_enabled_summary">Enable/Disable notification logging</string>
<string name="pref_blacklist_title">Blacklist</string>
<string name="pref_blacklist_summary">Exclude apps from being logged</string>
<string name="pref_clear_database_title">Clear database</string>
<string name="pref_clear_database_summary">Remove all logged notifications</string>
<string name="pref_export_title">Export to sdcard</string>
<string name="pref_about_title">About</string>
</resources>

View File

@@ -4,6 +4,7 @@
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
</style>
</resources>

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:key="screen_notification_settings"
android:title="@string/pref_category_notification_settings">
<SwitchPreferenceCompat
android:defaultValue="true"
android:key="pref_logging_enabled"
android:summary="@string/pref_logging_enabled_summary"
android:title="@string/pref_logging_enabled_title" />
<Preference
android:key="pref_blacklist"
android:summary="@string/pref_blacklist_summary"
android:title="@string/pref_blacklist_title" />
<Preference
android:key="pref_clear_database"
android:summary="@string/pref_clear_database_summary"
android:title="@string/pref_clear_database_title" />
<Preference
android:key="pref_export"
android:title="@string/pref_export_title" />
</PreferenceCategory>
<PreferenceCategory
android:key="screen_support"
android:title="@string/pref_category_support">
<Preference
android:key="pref_about"
android:title="@string/pref_about_title" />
</PreferenceCategory>
</PreferenceScreen>