diff options
author | Andrew Dolgov <[email protected]> | 2014-11-13 12:59:40 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2014-11-13 12:59:40 +0300 |
commit | 7a9ce35f2e4b3e186819e08930f1cfdc3ad121e6 (patch) | |
tree | 89187bd7e0f0207c5d162f64ecec1068298a153e /org.fox.ttrss/src | |
parent | 72505dc655841180533f3631ee8087580063b2ca (diff) |
remove unused styles
partially fix headlines list rendering incorrectly on 5.0 (thanks a lot, google)
Diffstat (limited to 'org.fox.ttrss/src')
20 files changed, 33 insertions, 84 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java index d605a9c1..ae174922 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java @@ -329,6 +329,11 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, ListView list = (ListView)view.findViewById(R.id.headlines_list); + // thanks google + if (android.os.Build.VERSION.SDK_INT <= android.os.Build.VERSION_CODES.KITKAT) { + list.setDividerHeight(0); + } + if (m_prefs.getBoolean("headlines_mark_read_scroll", false)) { WindowManager wm = (WindowManager) m_activity.getSystemService(Context.WINDOW_SERVICE); Display display = wm.getDefaultDisplay(); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java index ab89c8d9..ce2f1170 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java @@ -307,6 +307,11 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis ListView list = (ListView)view.findViewById(R.id.headlines_list); + // thanks google + if (android.os.Build.VERSION.SDK_INT <= android.os.Build.VERSION_CODES.KITKAT) { + list.setDividerHeight(0); + } + if (m_prefs.getBoolean("headlines_mark_read_scroll", false)) { WindowManager wm = (WindowManager) m_activity.getSystemService(Context.WINDOW_SERVICE); Display display = wm.getDefaultDisplay(); diff --git a/org.fox.ttrss/src/main/res/drawable/paper_sepia.xml b/org.fox.ttrss/src/main/res/drawable/paper_sepia.xml deleted file mode 100644 index 3951b4c8..00000000 --- a/org.fox.ttrss/src/main/res/drawable/paper_sepia.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - <bitmap xmlns:android="http://schemas.android.com/apk/res/android" - android:src="@drawable/paper_sepia_bitmap" - android:tileMode="repeat" />
\ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/drawable/shadow.xml b/org.fox.ttrss/src/main/res/drawable/shadow.xml deleted file mode 100644 index a293378f..00000000 --- a/org.fox.ttrss/src/main/res/drawable/shadow.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<bitmap - xmlns:android="http://schemas.android.com/apk/res/android" - android:src="@drawable/shadow_bitmap" - android:gravity="fill_vertical|right" /> diff --git a/org.fox.ttrss/src/main/res/drawable/shadow_feeds.xml b/org.fox.ttrss/src/main/res/drawable/shadow_feeds.xml deleted file mode 100644 index ab71b98d..00000000 --- a/org.fox.ttrss/src/main/res/drawable/shadow_feeds.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > - - <item android:drawable="@color/feeds_light"/> - <item android:drawable="@drawable/shadow"/> - -</layer-list>
\ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/drawable/shadow_feeds_gray.xml b/org.fox.ttrss/src/main/res/drawable/shadow_feeds_gray.xml deleted file mode 100644 index 35167a92..00000000 --- a/org.fox.ttrss/src/main/res/drawable/shadow_feeds_gray.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > - - <item android:drawable="@color/feeds_dark_gray"/> - <item android:drawable="@drawable/shadow"/> - -</layer-list>
\ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/drawable/shadow_feeds_sepia.xml b/org.fox.ttrss/src/main/res/drawable/shadow_feeds_sepia.xml deleted file mode 100644 index 30424e15..00000000 --- a/org.fox.ttrss/src/main/res/drawable/shadow_feeds_sepia.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > - - <item android:drawable="@color/feeds_sepia"/> - <item android:drawable="@drawable/shadow"/> - -</layer-list>
\ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/drawable/shadow_headlines.xml b/org.fox.ttrss/src/main/res/drawable/shadow_headlines.xml deleted file mode 100644 index 899a8687..00000000 --- a/org.fox.ttrss/src/main/res/drawable/shadow_headlines.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > - - <!-- <item android:drawable="@color/headlines_light"/> --> - <item android:drawable="@drawable/shadow"/> - -</layer-list>
\ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/drawable/shadow_headlines_gray.xml b/org.fox.ttrss/src/main/res/drawable/shadow_headlines_gray.xml deleted file mode 100644 index 35167a92..00000000 --- a/org.fox.ttrss/src/main/res/drawable/shadow_headlines_gray.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > - - <item android:drawable="@color/feeds_dark_gray"/> - <item android:drawable="@drawable/shadow"/> - -</layer-list>
\ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/drawable/shadow_headlines_sepia.xml b/org.fox.ttrss/src/main/res/drawable/shadow_headlines_sepia.xml deleted file mode 100644 index be7d496c..00000000 --- a/org.fox.ttrss/src/main/res/drawable/shadow_headlines_sepia.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > - - <item android:drawable="@drawable/paper_sepia"/> - <item android:drawable="@drawable/shadow"/> - -</layer-list>
\ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/layout-sw600dp-land/headlines_articles.xml b/org.fox.ttrss/src/main/res/layout-sw600dp-land/headlines_articles.xml index b4688ad4..86040461 100644 --- a/org.fox.ttrss/src/main/res/layout-sw600dp-land/headlines_articles.xml +++ b/org.fox.ttrss/src/main/res/layout-sw600dp-land/headlines_articles.xml @@ -24,7 +24,7 @@ android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="0.4" - android:background="?feedlistBackground" > + android:background="?headlinesBackground" > </FrameLayout> <FrameLayout diff --git a/org.fox.ttrss/src/main/res/layout-sw600dp-port/headlines.xml b/org.fox.ttrss/src/main/res/layout-sw600dp-port/headlines.xml index ba5b20e3..01737c68 100644 --- a/org.fox.ttrss/src/main/res/layout-sw600dp-port/headlines.xml +++ b/org.fox.ttrss/src/main/res/layout-sw600dp-port/headlines.xml @@ -19,13 +19,14 @@ android:id="@+id/headlines_fragment" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?smallScreenBackground"></FrameLayout> + android:background="?headlinesBackground"> + </FrameLayout> <FrameLayout android:id="@+id/feeds_fragment" android:layout_width="300dp" android:layout_gravity="start" - android:background="?smallScreenBackground" + android:background="?feedlistBackground" android:layout_height="match_parent" > </FrameLayout> diff --git a/org.fox.ttrss/src/main/res/layout-sw700dp-port/headlines_articles.xml b/org.fox.ttrss/src/main/res/layout-sw700dp-port/headlines_articles.xml index 08d3c501..7ed80c18 100644 --- a/org.fox.ttrss/src/main/res/layout-sw700dp-port/headlines_articles.xml +++ b/org.fox.ttrss/src/main/res/layout-sw700dp-port/headlines_articles.xml @@ -29,7 +29,7 @@ android:layout_height="match_parent" android:layout_width="500dp" android:layout_gravity="start" - android:background="?headlinesBackgroundSolid"> + android:background="?headlinesBackground"> </FrameLayout> </android.support.v4.widget.DrawerLayout> diff --git a/org.fox.ttrss/src/main/res/layout/article_images_pager.xml b/org.fox.ttrss/src/main/res/layout/article_images_pager.xml index 2755a6ae..28f71458 100644 --- a/org.fox.ttrss/src/main/res/layout/article_images_pager.xml +++ b/org.fox.ttrss/src/main/res/layout/article_images_pager.xml @@ -2,7 +2,7 @@ android:id="@+id/article_images" android:layout_width="fill_parent" android:fitsSystemWindows="true" - android:background="?smallScreenBackground" + android:background="?headlinesBackground" android:layout_height="fill_parent"> /* android:paddingLeft="@dimen/activity_horizontal_margin" diff --git a/org.fox.ttrss/src/main/res/layout/headlines.xml b/org.fox.ttrss/src/main/res/layout/headlines.xml index d8e29167..36270e01 100644 --- a/org.fox.ttrss/src/main/res/layout/headlines.xml +++ b/org.fox.ttrss/src/main/res/layout/headlines.xml @@ -12,13 +12,13 @@ android:id="@+id/headlines_fragment" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?smallScreenBackground"></FrameLayout> + android:background="?headlinesBackground"></FrameLayout> <FrameLayout android:id="@+id/feeds_fragment" android:layout_width="240dp" android:layout_gravity="start" - android:background="?smallScreenBackground" + android:background="?feedlistBackground" android:layout_height="match_parent" > </FrameLayout> diff --git a/org.fox.ttrss/src/main/res/layout/headlines_articles.xml b/org.fox.ttrss/src/main/res/layout/headlines_articles.xml index 06fb8b57..bb663de3 100644 --- a/org.fox.ttrss/src/main/res/layout/headlines_articles.xml +++ b/org.fox.ttrss/src/main/res/layout/headlines_articles.xml @@ -16,7 +16,7 @@ android:visibility="gone" android:layout_height="0dp" android:layout_width="0dp" - android:background="?headlinesBackgroundSolid"> + android:background="?headlinesBackground"> </FrameLayout> </FrameLayout>
\ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/layout/headlines_fragment.xml b/org.fox.ttrss/src/main/res/layout/headlines_fragment.xml index d0c318f1..0a759398 100644 --- a/org.fox.ttrss/src/main/res/layout/headlines_fragment.xml +++ b/org.fox.ttrss/src/main/res/layout/headlines_fragment.xml @@ -13,9 +13,8 @@ android:id="@+id/headlines_list" android:layout_width="match_parent" android:layoutAnimation="@anim/layout_headline" - android:dividerHeight="0dp" - android:divider="@null" - android:paddingTop="3dp" + android:dividerHeight="8dp" + android:divider="@android:color/transparent" android:layout_height="match_parent" > </ListView> </android.support.v4.widget.SwipeRefreshLayout> diff --git a/org.fox.ttrss/src/main/res/values/attrs.xml b/org.fox.ttrss/src/main/res/values/attrs.xml index fcf4ee30..a926e83f 100644 --- a/org.fox.ttrss/src/main/res/values/attrs.xml +++ b/org.fox.ttrss/src/main/res/values/attrs.xml @@ -2,10 +2,8 @@ <resources> <attr name="ttrssHorizontalDivider" format="reference|color" /> <attr name="feedlistBackground" format="reference|color" /> - <attr name="smallScreenBackground" format="reference|color" /> <attr name="unreadCounterColor" format="reference|color" /> <attr name="headlinesBackground" format="reference|color" /> - <attr name="headlinesBackgroundSolid" format="reference|color" /> <attr name="articleBackground" format="reference|color" /> <attr name="headlineSelectedBackground" format="reference|color" /> <attr name="headlineUnreadBackground" format="reference|color" /> diff --git a/org.fox.ttrss/src/main/res/values/resources.xml b/org.fox.ttrss/src/main/res/values/resources.xml index 9a2c3a63..daebd5cb 100644 --- a/org.fox.ttrss/src/main/res/values/resources.xml +++ b/org.fox.ttrss/src/main/res/values/resources.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <color name="feeds_light">#e0e0e0</color> + <!-- <color name="feeds_light">#e0e0e0</color> <color name="headlines_light">#ffffff</color> <color name="headlines_sepia">#EAE2DC</color> <color name="feeds_sepia">#D3C6BA</color> @@ -9,5 +9,5 @@ <color name="unread_counter_background_dark">#63758E</color> <color name="unread_counter_background_sepia">#C46262</color> <color name="unread_counter_background_selected_light">#4684ff</color> - <color name="feeds_dark_gray">#1c1d1e</color> + <color name="feeds_dark_gray">#1c1d1e</color> --> </resources>
\ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/values/style.xml b/org.fox.ttrss/src/main/res/values/style.xml index fddc4ce0..8eb6229e 100644 --- a/org.fox.ttrss/src/main/res/values/style.xml +++ b/org.fox.ttrss/src/main/res/values/style.xml @@ -2,12 +2,10 @@ <style name="LightTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="statusBarHintColor">?colorPrimary</item> - <item name="smallScreenBackground">#eeeeee</item> <item name="ttrssHorizontalDivider">@android:drawable/divider_horizontal_bright</item> - <item name="feedlistBackground"><!-- #e0e0e0 -->@drawable/shadow_feeds</item> + <item name="feedlistBackground">#e0e0e0</item> <item name="unreadCounterColor">#909090</item> - <item name="headlinesBackground"><!-- #f0f0f0 -->@drawable/shadow_headlines</item> - <item name="headlinesBackgroundSolid">#f0f0f0</item> + <item name="headlinesBackground">#f0f0f0</item> <item name="articleBackground">@android:color/white</item> <item name="headlineSelectedBackground">?colorAccent</item> <item name="headlineUnreadBackground">@android:color/white</item> @@ -39,10 +37,8 @@ </style> <style name="SepiaTheme" parent="LightTheme"> - <item name="smallScreenBackground">@drawable/paper_sepia</item> - <item name="feedlistBackground">@drawable/shadow_feeds_sepia</item> - <item name="headlinesBackground">@drawable/shadow_headlines_sepia</item> - <item name="headlinesBackgroundSolid">@drawable/paper_sepia</item> + <item name="feedlistBackground">#EAE2DC</item> + <item name="headlinesBackground">#EAE2DC</item> <item name="feedlistTextColor">#35281C</item> <item name="linkColor">?colorPrimary</item> @@ -57,15 +53,13 @@ <item name="articleNoteBackground">#543800</item> <item name="headlineNormalBackground">@android:color/black</item> - <item name="smallScreenBackground">@android:color/black</item> <item name="feedlistBackground">?colorPrimaryDark</item> <item name="headlinesBackground">@android:color/black</item> - <item name="headlinesBackgroundSolid">@android:color/black</item> <item name="articleBackground">@android:color/black</item> <item name="articleHeaderTextColor">?linkColor</item> - <item name="articleTextColor">?colorPrimary</item> + <item name="articleTextColor">#D2B944</item> <item name="linkColor">?colorAccent</item> <item name="feedlistTextColor">?linkColor</item> @@ -83,9 +77,9 @@ <item name="iconTintColor">?linkColor</item> - <item name="colorPrimary">#CC9500</item> + <item name="colorPrimary">@android:color/black</item> <item name="colorPrimaryDark">#A57100</item> - <item name="colorAccent">#FFBF00</item> + <item name="colorAccent">#EACF4C</item> </style> <style name="DarkTheme" parent="Theme.AppCompat"> @@ -107,12 +101,10 @@ <item name="articleNoteTextColor">@android:color/secondary_text_dark</item> <item name="articleNoteBackground">#303030</item> <item name="parentBtnBackground">#101010</item> - <item name="smallScreenBackground">@color/feeds_dark_gray</item> <item name="ttrssHorizontalDivider">@android:drawable/divider_horizontal_dark</item> - <item name="feedlistBackground">@drawable/shadow_feeds_gray</item> - <item name="headlinesBackground">@drawable/shadow_headlines_gray</item> - <item name="headlinesBackgroundSolid">@color/feeds_dark_gray</item> - <item name="articleBackground">@color/feeds_dark_gray</item> + <item name="feedlistBackground">#1c1d1e</item> + <item name="headlinesBackground">#1c1d1e</item> + <item name="articleBackground">#1c1d1e</item> <item name="feedsSelectedBackground">?colorPrimaryDark</item> <item name="feedlistSelectedTextColor">@android:color/primary_text_dark</item> <item name="articleHeader">?colorPrimaryDark</item> |