From 7a9ce35f2e4b3e186819e08930f1cfdc3ad121e6 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 13 Nov 2014 12:59:40 +0300 Subject: [PATCH] remove unused styles partially fix headlines list rendering incorrectly on 5.0 (thanks a lot, google) --- .../java/org/fox/ttrss/HeadlinesFragment.java | 5 ++++ .../offline/OfflineHeadlinesFragment.java | 5 ++++ .../src/main/res/drawable/paper_sepia.xml | 4 --- .../src/main/res/drawable/shadow.xml | 5 ---- .../src/main/res/drawable/shadow_feeds.xml | 7 ----- .../main/res/drawable/shadow_feeds_gray.xml | 7 ----- .../main/res/drawable/shadow_feeds_sepia.xml | 7 ----- .../main/res/drawable/shadow_headlines.xml | 7 ----- .../res/drawable/shadow_headlines_gray.xml | 7 ----- .../res/drawable/shadow_headlines_sepia.xml | 7 ----- .../headlines_articles.xml | 2 +- .../res/layout-sw600dp-port/headlines.xml | 5 ++-- .../headlines_articles.xml | 2 +- .../main/res/layout/article_images_pager.xml | 2 +- .../src/main/res/layout/headlines.xml | 4 +-- .../main/res/layout/headlines_articles.xml | 2 +- .../main/res/layout/headlines_fragment.xml | 5 ++-- org.fox.ttrss/src/main/res/values/attrs.xml | 2 -- .../src/main/res/values/resources.xml | 4 +-- org.fox.ttrss/src/main/res/values/style.xml | 28 +++++++------------ 20 files changed, 33 insertions(+), 84 deletions(-) delete mode 100644 org.fox.ttrss/src/main/res/drawable/paper_sepia.xml delete mode 100644 org.fox.ttrss/src/main/res/drawable/shadow.xml delete mode 100644 org.fox.ttrss/src/main/res/drawable/shadow_feeds.xml delete mode 100644 org.fox.ttrss/src/main/res/drawable/shadow_feeds_gray.xml delete mode 100644 org.fox.ttrss/src/main/res/drawable/shadow_feeds_sepia.xml delete mode 100644 org.fox.ttrss/src/main/res/drawable/shadow_headlines.xml delete mode 100644 org.fox.ttrss/src/main/res/drawable/shadow_headlines_gray.xml delete mode 100644 org.fox.ttrss/src/main/res/drawable/shadow_headlines_sepia.xml 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 @@ - - \ 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 @@ - - 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 @@ - - - - - - - \ 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 @@ - - - - - - - \ 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 @@ - - - - - - - \ 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 @@ - - - - - - - \ 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 @@ - - - - - - - \ 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 @@ - - - - - - - \ 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" > + android:background="?headlinesBackground"> + 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"> 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"> + android:background="?headlinesBackground"> 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"> \ 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" > 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 @@ - - 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 @@ - #e0e0e0 + \ 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 @@