diff options
Diffstat (limited to 'app/src/main/res')
24 files changed, 317 insertions, 4 deletions
diff --git a/app/src/main/res/layout/activity_filter.xml b/app/src/main/res/layout/activity_filter.xml new file mode 100644 index 0000000..b144d08 --- /dev/null +++ b/app/src/main/res/layout/activity_filter.xml @@ -0,0 +1,13 @@ +<RelativeLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context="org.rssin.android.FilterActivity"> + + <ListView + android:id="@+id/filter_items_list" + android:layout_width="match_parent" + android:layout_height="match_parent"/> + +</RelativeLayout> diff --git a/app/src/main/res/layout/activity_filter_settings.xml b/app/src/main/res/layout/activity_filter_settings.xml new file mode 100644 index 0000000..6ee5331 --- /dev/null +++ b/app/src/main/res/layout/activity_filter_settings.xml @@ -0,0 +1,38 @@ +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + tools:context="org.rssin.android.FilterSettingsActivity" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:paddingLeft="0dp" + android:paddingRight="0dp" + android:paddingTop="0dp" + android:paddingBottom="0dp" + android:orientation="vertical"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <EditText + android:id="@+id/filter_settings_add_keyword" + android:layout_width="0dip" + android:layout_weight="1" + android:layout_height="wrap_content" + android:maxLines="1"/> + + <Button + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/filter_settings_add_keyword" + android:onClick="addKeyword"/> + + </LinearLayout> + + <ListView + android:id="@+id/filter_settings_feeds_list" + android:layout_width="match_parent" + android:layout_height="match_parent"></ListView> + +</LinearLayout> diff --git a/app/src/main/res/layout/activity_filters.xml b/app/src/main/res/layout/activity_filters.xml new file mode 100644 index 0000000..700e939 --- /dev/null +++ b/app/src/main/res/layout/activity_filters.xml @@ -0,0 +1,17 @@ +<RelativeLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:paddingLeft="0dp" + android:paddingRight="0dp" + android:paddingTop="0dp" + android:paddingBottom="0dp" + tools:context="org.rssin.android.FiltersActivity"> + + <ListView + android:id="@+id/filters_list" + android:layout_width="match_parent" + android:layout_height="match_parent"></ListView> + +</RelativeLayout> diff --git a/app/src/main/res/layout/activity_unified_inbox.xml b/app/src/main/res/layout/activity_unified_inbox.xml index 1f25ce7..5c56465 100644 --- a/app/src/main/res/layout/activity_unified_inbox.xml +++ b/app/src/main/res/layout/activity_unified_inbox.xml @@ -5,7 +5,4 @@ android:paddingTop="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".UnifiedInboxActivity"> - <TextView android:text="@string/hello_world" android:layout_width="wrap_content" - android:layout_height="wrap_content" /> - </RelativeLayout> diff --git a/app/src/main/res/layout/fragment_filter_settings_feeds.xml b/app/src/main/res/layout/fragment_filter_settings_feeds.xml new file mode 100644 index 0000000..9c1e1f4 --- /dev/null +++ b/app/src/main/res/layout/fragment_filter_settings_feeds.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <EditText + android:id="@+id/filter_settings_add_feed" + android:layout_width="0dip" + android:layout_weight="1" + android:layout_height="wrap_content" + android:maxLines="1" + android:inputType="textUri"/> + + <Button + android:id="@+id/filter_settings_add_feed_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/filter_settings_add_feed"/> + + </LinearLayout> + + <ListView + android:id="@+id/filter_settings_feeds_list" + android:layout_width="match_parent" + android:layout_height="match_parent"/> + +</LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/item_feeditem.xml b/app/src/main/res/layout/item_feeditem.xml new file mode 100644 index 0000000..9f4c553 --- /dev/null +++ b/app/src/main/res/layout/item_feeditem.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:padding="10dp"> + + <TextView android:id="@+id/feeditem_title" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:textSize="@dimen/font_size_normal"/> + + <TextView android:id="@+id/feeditem_summary" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:textSize="@dimen/font_size_small"/> + +</LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/item_filter.xml b/app/src/main/res/layout/item_filter.xml new file mode 100644 index 0000000..c91a1a5 --- /dev/null +++ b/app/src/main/res/layout/item_filter.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:padding="10dp"> + + <TextView android:id="@+id/filter_item_title" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:textSize="@dimen/font_size_large"/> + + <TextView android:id="@+id/filter_item_keywords" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:textSize="@dimen/font_size_normal"/> + +</LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/item_filter_settings_feed.xml b/app/src/main/res/layout/item_filter_settings_feed.xml new file mode 100644 index 0000000..ed3d596 --- /dev/null +++ b/app/src/main/res/layout/item_filter_settings_feed.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:padding="10dp"> + + <TextView android:id="@+id/filter_settings_feed_item_title" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:textSize="@dimen/font_size_large"/> + + <TextView android:id="@+id/filter_settings_feed_item_url" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:textSize="@dimen/font_size_normal"/> + +</LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/item_filter_settings_keyword.xml b/app/src/main/res/layout/item_filter_settings_keyword.xml new file mode 100644 index 0000000..36d8c59 --- /dev/null +++ b/app/src/main/res/layout/item_filter_settings_keyword.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + + <TextView android:id="@+id/filter_settings_keyword_item_title" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:padding="10dp" + android:textSize="@dimen/font_size_normal"/> + +</LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/menu/menu_filter.xml b/app/src/main/res/menu/menu_filter.xml new file mode 100644 index 0000000..aaf1ca1 --- /dev/null +++ b/app/src/main/res/menu/menu_filter.xml @@ -0,0 +1,6 @@ +<menu xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" tools:context="org.rssin.android.FilterActivity"> + <item android:id="@+id/action_settings" android:title="@string/action_settings" + android:orderInCategory="100" app:showAsAction="never" /> +</menu> diff --git a/app/src/main/res/menu/menu_filter_settings.xml b/app/src/main/res/menu/menu_filter_settings.xml new file mode 100644 index 0000000..848c9df --- /dev/null +++ b/app/src/main/res/menu/menu_filter_settings.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<menu + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + tools:context=".FilterSettingsActivity"> + + <item + android:id="@+id/filter_settings_action_feeds" + android:title="@string/filter_settings_action_feeds" + app:showAsAction="ifRoom" /> + + <item + android:id="@+id/filter_settings_action_title" + android:title="@string/filter_settings_action_title" + app:showAsAction="ifRoom" /> + + <item + android:id="@+id/filter_settings_action_delete" + android:title="@string/filter_settings_action_delete" + app:showAsAction="never" /> + +</menu> diff --git a/app/src/main/res/menu/menu_filters.xml b/app/src/main/res/menu/menu_filters.xml new file mode 100644 index 0000000..5973bd0 --- /dev/null +++ b/app/src/main/res/menu/menu_filters.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<menu + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + tools:context=".FilterSettingsActivity"> + + <item + android:id="@+id/filters_action_add" + android:title="@string/filters_action_add" + android:orderInCategory="100" + app:showAsAction="ifRoom" /> + +</menu> diff --git a/app/src/main/res/menu/menu_unified_inbox.xml b/app/src/main/res/menu/menu_unified_inbox.xml index 2c72c6d..2800171 100644 --- a/app/src/main/res/menu/menu_unified_inbox.xml +++ b/app/src/main/res/menu/menu_unified_inbox.xml @@ -1,6 +1,9 @@ <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:context=".UnifiedInboxActivity"> + <item android:id="@+id/action_settings" android:title="@string/action_settings" android:orderInCategory="100" app:showAsAction="never" /> + <item android:id="@+id/action_filters" android:title="@string/action_filters" + android:orderInCategory="100" app:showAsAction="never" /> </menu> diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png Binary files differindex cde69bc..2e7f377 100644 --- a/app/src/main/res/mipmap-hdpi/ic_launcher.png +++ b/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png Binary files differindex c133a0c..c7d5ca5 100644 --- a/app/src/main/res/mipmap-mdpi/ic_launcher.png +++ b/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png Binary files differindex bfa42f0..8d1bf3a 100644 --- a/app/src/main/res/mipmap-xhdpi/ic_launcher.png +++ b/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png Binary files differindex 324e72c..9e7e711 100644 --- a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +++ b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png Binary files differnew file mode 100644 index 0000000..63c5a0d --- /dev/null +++ b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 47c8224..0121f92 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -2,4 +2,11 @@ <!-- Default screen margins, per the Android Design guidelines. --> <dimen name="activity_horizontal_margin">16dp</dimen> <dimen name="activity_vertical_margin">16dp</dimen> + + <dimen name="listview_item_padding">16dp</dimen> + + <dimen name="font_size_huge">24sp</dimen> + <dimen name="font_size_large">20sp</dimen> + <dimen name="font_size_normal">16sp</dimen> + <dimen name="font_size_small">14sp</dimen> </resources> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index bbe8b60..da60e14 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,6 +1,32 @@ <resources> <string name="app_name">RSSin</string> - <string name="hello_world">Hello world!</string> <string name="action_settings">Settings</string> + <string name="action_filters">Filters</string> + + <string name="button_ok">OK</string> + <string name="button_apply">Apply</string> + <string name="button_cancel">Cancel</string> + + <string name="title_activity_filters">Filters</string> + <string name="title_activity_filter_settings">Filter</string> + <string name="title_activity_filter">Filter</string> + + <string name="filters_action_add">Add</string> + + <string name="filter_settings_edit_keywords">Edit</string> + <string name="filter_settings_feeds">Feeds</string> + <string name="filter_settings_add_keyword">Add</string> + <string name="filter_settings_add_feed">Add</string> + <string name="filter_settings_action_feeds">Feeds</string> + <string name="filter_settings_action_title">Title</string> + <string name="filter_settings_action_delete">Delete</string> + + <string name="error_save_filters">Couldn\'t save filter</string> + <string name="error_load_filters">Couldn\'t load filters</string> + <string name="error_delete_filter">Couldn\'t delete filter</string> + + <string name="error_invalid_url">Invalid URL</string> + + <string name="error_net_load">Internet problem</string> </resources> diff --git a/app/src/main/res/values/strings_activity_settings.xml b/app/src/main/res/values/strings_activity_settings.xml new file mode 100644 index 0000000..73fa482 --- /dev/null +++ b/app/src/main/res/values/strings_activity_settings.xml @@ -0,0 +1,34 @@ +<resources> + <string name="title_activity_settings">Settings</string> + + <!-- Example General settings --> + <string name="pref_header_general">General</string> + + <!-- Example settings for Data & Sync --> + <string name="pref_header_data_sync">Data & sync</string> + + <string name="pref_title_sync_frequency">Sync frequency</string> + <string-array name="pref_sync_frequency_titles"> + <item>1 minute</item> + <item>2 minutes</item> + <item>5 minutes</item> + <item>10 minutes</item> + <item>15 minutes</item> + <item>30 minutes</item> + <item>1 hour</item> + <item>Never</item> + </string-array> + <string-array name="pref_sync_frequency_values"> + <item>1</item> + <item>2</item> + <item>5</item> + <item>10</item> + <item>15</item> + <item>30</item> + <item>60</item> + <item>-1</item> + </string-array> + + <string name="pref_title_system_sync_settings">System sync settings</string> + +</resources> 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_headers.xml b/app/src/main/res/xml/pref_headers.xml new file mode 100644 index 0000000..1c58203 --- /dev/null +++ b/app/src/main/res/xml/pref_headers.xml @@ -0,0 +1,6 @@ +<preference-headers xmlns:android="http://schemas.android.com/apk/res/android"> + + <header android:fragment="org.rssin.android.SettingsActivity$DataSyncPreferenceFragment" + android:title="@string/pref_header_data_sync" /> + +</preference-headers> diff --git a/app/src/main/res/xml/pref_main.xml b/app/src/main/res/xml/pref_main.xml new file mode 100644 index 0000000..dfc2102 --- /dev/null +++ b/app/src/main/res/xml/pref_main.xml @@ -0,0 +1,3 @@ +<?xml version="1.0" encoding="utf-8"?> +<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> +</PreferenceScreen>
\ No newline at end of file |