From db782c04353a2462bdf6d3262d2edeb88402d371 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 22 Jun 2012 12:21:32 +0400 Subject: [PATCH] layout/style update (add selection marker arrowheads) --- res/drawable-hdpi/arrowhead_dark.png | Bin 0 -> 279 bytes res/drawable-hdpi/arrowhead_light.png | Bin 0 -> 1283 bytes res/drawable/headline_row_selected_dark.xml | 11 ++++++ res/drawable/headline_row_selected_light.xml | 11 ++++++ res/layout-port/headlines_row_selected.xml | 2 +- res/layout-xlarge/feeds_row_selected.xml | 38 +++++++++++++++++++ res/layout/feeds_row.xml | 2 +- res/layout/feeds_row_selected.xml | 2 +- res/layout/headlines_fragment.xml | 8 ++-- res/layout/headlines_row.xml | 4 +- res/layout/headlines_row_selected.xml | 6 +-- res/layout/headlines_row_unread.xml | 4 +- res/values-v14/style.xml | 20 ++++++---- res/values/attrs.xml | 2 + res/values/resources.xml | 3 +- res/values/style.xml | 4 ++ src/org/fox/ttrss/HeadlinesFragment.java | 3 ++ src/org/fox/ttrss/MainActivity.java | 8 +++- 18 files changed, 104 insertions(+), 24 deletions(-) create mode 100644 res/drawable-hdpi/arrowhead_dark.png create mode 100644 res/drawable-hdpi/arrowhead_light.png create mode 100644 res/drawable/headline_row_selected_dark.xml create mode 100644 res/drawable/headline_row_selected_light.xml create mode 100644 res/layout-xlarge/feeds_row_selected.xml diff --git a/res/drawable-hdpi/arrowhead_dark.png b/res/drawable-hdpi/arrowhead_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..ad263895a757868c89547cf0b9af2fe260e04136 GIT binary patch literal 279 zcmeAS@N?(olHy`uVBq!ia0vp^fanMprB-lYeY$Kep*R+Vo@qXKw@TIiJqTph(ejM zo~fRxXV;$xKt=7IE{-7{-fOQ!a~)9NaS6Qs;@|g4b}P1Q?VLF?D@%Vq= UOs-|8flgxZboFyt=akR{02zc_CIA2c literal 0 HcmV?d00001 diff --git a/res/drawable-hdpi/arrowhead_light.png b/res/drawable-hdpi/arrowhead_light.png new file mode 100644 index 0000000000000000000000000000000000000000..130dbf1820ae83b728420eed091a668fa4159606 GIT binary patch literal 1283 zcmeAS@N?(olHy`uVBq!ia0vp^fF}G0YmV2c2!^! z;4JWnEM{QfI}E~%$MaXD00kvWTq8KjgkGC~-%{;+2jafxJK*oV-p2`%F zB{m$41&%wM3R)h{|9R)INblC~39F)V|5s^d?E5-dGiv$QH=2 + + + + + + + \ No newline at end of file diff --git a/res/drawable/headline_row_selected_light.xml b/res/drawable/headline_row_selected_light.xml new file mode 100644 index 00000000..0e5fa6ba --- /dev/null +++ b/res/drawable/headline_row_selected_light.xml @@ -0,0 +1,11 @@ + + + + + + + + \ No newline at end of file diff --git a/res/layout-port/headlines_row_selected.xml b/res/layout-port/headlines_row_selected.xml index 2d1620db..8ee02bb2 100644 --- a/res/layout-port/headlines_row_selected.xml +++ b/res/layout-port/headlines_row_selected.xml @@ -3,7 +3,7 @@ android:id="@+id/headlines_row" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:background="?headlineSelectedBackground" + android:background="?headlineSelectedBackgroundSolid" android:gravity="center_vertical" android:orientation="vertical" > diff --git a/res/layout-xlarge/feeds_row_selected.xml b/res/layout-xlarge/feeds_row_selected.xml new file mode 100644 index 00000000..d8481005 --- /dev/null +++ b/res/layout-xlarge/feeds_row_selected.xml @@ -0,0 +1,38 @@ + + + + + + + + + \ No newline at end of file diff --git a/res/layout/feeds_row.xml b/res/layout/feeds_row.xml index 46f809a8..0fde2d33 100644 --- a/res/layout/feeds_row.xml +++ b/res/layout/feeds_row.xml @@ -25,7 +25,7 @@ android:id="@+id/unread_counter" android:gravity="right" android:textStyle="bold" - android:paddingRight="6dip" + android:paddingRight="12dip" android:textColor="?unreadCounterColor" android:layout_gravity="center_vertical" android:layout_width="wrap_content" diff --git a/res/layout/feeds_row_selected.xml b/res/layout/feeds_row_selected.xml index ea3a050a..7b920858 100644 --- a/res/layout/feeds_row_selected.xml +++ b/res/layout/feeds_row_selected.xml @@ -2,7 +2,7 @@ diff --git a/res/layout/headlines_fragment.xml b/res/layout/headlines_fragment.xml index e131d28e..787a8c8d 100644 --- a/res/layout/headlines_fragment.xml +++ b/res/layout/headlines_fragment.xml @@ -1,8 +1,10 @@ - - + android:layout_height="fill_parent" + android:paddingLeft="5dp" > + diff --git a/res/layout/headlines_row.xml b/res/layout/headlines_row.xml index 8b154777..b338d3a3 100644 --- a/res/layout/headlines_row.xml +++ b/res/layout/headlines_row.xml @@ -68,7 +68,7 @@ android:singleLine="true" android:text="{Feed title...}" android:textColor="?headlineExcerptTextColor" - android:textSize="11sp" /> + android:textSize="10sp" /> + android:textSize="10sp" > + android:textSize="10sp" /> + android:textSize="10sp" > + android:textSize="10sp" /> + android:textSize="10sp" > @drawable/shadow_headlines #f0f0f0 #ffffff - #ffffff + @drawable/headline_row_selected_light + @color/headline_row_selected_light @android:color/transparent @android:color/transparent - #f0f0f0 + @drawable/headline_row_selected_light + @color/headline_row_selected_light @android:color/primary_text_light - @android:color/primary_text_light + #ffffff @android:color/secondary_text_light @android:color/primary_text_light - @android:color/primary_text_light + #ffffff @android:color/secondary_text_light @android:color/secondary_text_light #30B0E0 @@ -26,16 +28,18 @@ #303030 @drawable/ics_divider_vertical @android:color/transparent - @android:color/transparent - @color/ics_cyan + @android:color/black + @drawable/headline_row_selected_dark + @color/ics_cyan @android:color/transparent @android:color/transparent - @color/ics_cyan + @drawable/headline_row_selected_dark + @color/ics_cyan @android:color/primary_text_dark @android:color/black @android:color/secondary_text_dark @android:color/primary_text_dark - @android:color/black + @android:color/white @android:color/secondary_text_dark @android:color/black @color/ics_cyan diff --git a/res/values/attrs.xml b/res/values/attrs.xml index 706ea035..2fcfc738 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -7,9 +7,11 @@ + + diff --git a/res/values/resources.xml b/res/values/resources.xml index dbf96dc6..9016d532 100644 --- a/res/values/resources.xml +++ b/res/values/resources.xml @@ -2,7 +2,8 @@ #e0e0e0 - #f0f0f0 + #ffffff + #33b5e5 #33b5e5 \ No newline at end of file diff --git a/res/values/style.xml b/res/values/style.xml index 9bf539eb..3dc02436 100644 --- a/res/values/style.xml +++ b/res/values/style.xml @@ -8,9 +8,11 @@ #ffffff @android:color/transparent #fff7d5 + #fff7d5 #ffffff #f0f0f0 #96C5FF + #96C5FF @android:color/primary_text_light @android:color/primary_text_light @android:color/primary_text_light @@ -29,9 +31,11 @@ #000000 @android:color/transparent #F5B800 + #F5B800 #303030 @android:color/transparent #F5B800 + #F5B800 @android:color/primary_text_dark @android:color/primary_text_dark @android:color/primary_text_dark diff --git a/src/org/fox/ttrss/HeadlinesFragment.java b/src/org/fox/ttrss/HeadlinesFragment.java index 9cdab1da..1bfdeb40 100644 --- a/src/org/fox/ttrss/HeadlinesFragment.java +++ b/src/org/fox/ttrss/HeadlinesFragment.java @@ -146,6 +146,9 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, //list.setEmptyView(view.findViewById(R.id.no_headlines)); registerForContextMenu(list); + if (m_onlineServices.isSmallScreen()) + view.findViewById(R.id.headlines_fragment).setPadding(0, 0, 0, 0); + Log.d(TAG, "onCreateView, feed=" + m_feed); if (m_feed != null && (m_articles == null || m_articles.size() == 0)) diff --git a/src/org/fox/ttrss/MainActivity.java b/src/org/fox/ttrss/MainActivity.java index 67a4a328..206ea358 100644 --- a/src/org/fox/ttrss/MainActivity.java +++ b/src/org/fox/ttrss/MainActivity.java @@ -833,22 +833,26 @@ public class MainActivity extends FragmentActivity implements OnlineServices { FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); Fragment headlines = getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES); - Fragment cats = getSupportFragmentManager().findFragmentByTag(FRAG_CATS); + FeedCategoriesFragment cats = (FeedCategoriesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_CATS); ft.show(cats); ft.remove(headlines); + cats.setSelectedCategory(null); + //ft.replace(R.id.fragment_container, new FeedCategoriesFragment(), FRAG_CATS); ft.commit(); } else { FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); Fragment headlines = getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES); - Fragment feeds = getSupportFragmentManager().findFragmentByTag(FRAG_FEEDS); + FeedsFragment feeds = (FeedsFragment) getSupportFragmentManager().findFragmentByTag(FRAG_FEEDS); ft.show(feeds); ft.remove(headlines); + feeds.setSelectedFeed(null); + ft.commit(); }