diff options
-rw-r--r-- | res/drawable-hdpi/arrowhead_dark.png | bin | 0 -> 279 bytes | |||
-rw-r--r-- | res/drawable-hdpi/arrowhead_light.png | bin | 0 -> 1283 bytes | |||
-rw-r--r-- | res/drawable/headline_row_selected_dark.xml | 11 | ||||
-rw-r--r-- | res/drawable/headline_row_selected_light.xml | 11 | ||||
-rw-r--r-- | res/layout-port/headlines_row_selected.xml | 2 | ||||
-rw-r--r-- | res/layout-xlarge/feeds_row_selected.xml | 38 | ||||
-rw-r--r-- | res/layout/feeds_row.xml | 2 | ||||
-rw-r--r-- | res/layout/feeds_row_selected.xml | 2 | ||||
-rw-r--r-- | res/layout/headlines_fragment.xml | 8 | ||||
-rw-r--r-- | res/layout/headlines_row.xml | 4 | ||||
-rw-r--r-- | res/layout/headlines_row_selected.xml | 6 | ||||
-rw-r--r-- | res/layout/headlines_row_unread.xml | 4 | ||||
-rw-r--r-- | res/values-v14/style.xml | 20 | ||||
-rw-r--r-- | res/values/attrs.xml | 2 | ||||
-rw-r--r-- | res/values/resources.xml | 3 | ||||
-rw-r--r-- | res/values/style.xml | 4 | ||||
-rw-r--r-- | src/org/fox/ttrss/HeadlinesFragment.java | 3 | ||||
-rw-r--r-- | src/org/fox/ttrss/MainActivity.java | 8 |
18 files changed, 104 insertions, 24 deletions
diff --git a/res/drawable-hdpi/arrowhead_dark.png b/res/drawable-hdpi/arrowhead_dark.png Binary files differnew file mode 100644 index 00000000..ad263895 --- /dev/null +++ b/res/drawable-hdpi/arrowhead_dark.png diff --git a/res/drawable-hdpi/arrowhead_light.png b/res/drawable-hdpi/arrowhead_light.png Binary files differnew file mode 100644 index 00000000..130dbf18 --- /dev/null +++ b/res/drawable-hdpi/arrowhead_light.png diff --git a/res/drawable/headline_row_selected_dark.xml b/res/drawable/headline_row_selected_dark.xml new file mode 100644 index 00000000..b8ddb446 --- /dev/null +++ b/res/drawable/headline_row_selected_dark.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
+
+ <item android:drawable="@color/ics_cyan"/>
+
+ <item><bitmap
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/arrowhead_dark"
+ android:gravity="center_vertical|right" /></item>
+
+</layer-list>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
+
+ <item android:drawable="@color/headline_row_selected_light"/>
+
+ <item><bitmap
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/arrowhead_light"
+ android:gravity="center_vertical|right" /></item>
+
+</layer-list>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_height="?android:attr/listPreferredItemHeight" + android:orientation="horizontal" + android:background="?feedsSelectedBackground" + android:gravity="center_vertical" + android:id="@+id/feeds_row" android:layout_width="match_parent" android:paddingBottom="4dip" android:paddingLeft="8dip" android:paddingRight="8dip" android:paddingTop="4dip"> + + <ImageView + android:id="@+id/icon" + android:layout_width="16dp" + android:layout_height="16dp" + android:scaleType="fitXY" + + android:layout_weight="0" + android:src="@drawable/ic_rss_bw" /> + + <TextView + android:id="@+id/title" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_gravity="center_vertical" + android:paddingLeft="6dip" + android:textColor="?feedlistSelectedTextColor" + android:text="{FEED}" android:layout_width="0dp" android:textSize="18dip"/> + <TextView + android:id="@+id/unread_counter" + android:gravity="right" + android:textStyle="bold" + android:paddingRight="12dp" + android:textColor="?unreadCounterColor" + android:layout_gravity="center_vertical" + android:layout_width="wrap_content" + android:layout_weight="0" + android:layout_height="wrap_content" + android:text="{123}" android:textSize="13sp"/> + +</LinearLayout>
\ 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 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="?android:attr/listPreferredItemHeight" android:orientation="horizontal" - android:background="?feedsSelectedBackground" + android:background="?feedsSelectedBackgroundSolid" android:gravity="center_vertical" android:id="@+id/feeds_row" android:layout_width="match_parent" android:paddingBottom="4dip" android:paddingLeft="8dip" android:paddingRight="8dip" android:paddingTop="4dip"> 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 @@ <?xml version="1.0" encoding="utf-8" ?>
-
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/headlines_fragment"
android:layout_width="fill_parent"
- android:layout_height="fill_parent" android:id="@+id/headlines_fragment"> + android:layout_height="fill_parent"
+ android:paddingLeft="5dp" >
+ <ListView android:layout_height="match_parent" android:layout_width="match_parent" android:id="@+id/headlines"></ListView> <LinearLayout android:id="@+id/loading_container" android:gravity="center" android:layout_height="match_parent" android:layout_width="match_parent">
<TextView android:layout_width="wrap_content" android:textAppearance="?android:attr/textAppearanceLarge" android:id="@+id/loading_message" android:layout_height="wrap_content" ></TextView>
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" />
<TextView
android:id="@+id/date"
@@ -77,7 +77,7 @@ android:gravity="center_horizontal"
android:text="Jan 01"
android:textColor="#909090"
- android:textSize="11sp" >
+ android:textSize="10sp" >
</TextView>
<LinearLayout
diff --git a/res/layout/headlines_row_selected.xml b/res/layout/headlines_row_selected.xml index 115167bb..4edae560 100644 --- a/res/layout/headlines_row_selected.xml +++ b/res/layout/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:orientation="vertical" >
<LinearLayout
@@ -67,7 +67,7 @@ android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineExcerptTextColor"
- android:textSize="11sp" />
+ android:textSize="10sp" />
<TextView
android:id="@+id/date"
@@ -76,7 +76,7 @@ android:gravity="center_horizontal"
android:text="Jan 01"
android:textColor="#909090"
- android:textSize="11sp" >
+ android:textSize="10sp" >
</TextView>
<LinearLayout
diff --git a/res/layout/headlines_row_unread.xml b/res/layout/headlines_row_unread.xml index b85b6699..36cb4706 100644 --- a/res/layout/headlines_row_unread.xml +++ b/res/layout/headlines_row_unread.xml @@ -67,7 +67,7 @@ android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineExcerptTextColor"
- android:textSize="11sp" />
+ android:textSize="10sp" />
<TextView
android:id="@+id/date"
@@ -76,7 +76,7 @@ android:gravity="center_horizontal"
android:text="Jan 01"
android:textColor="#909090"
- android:textSize="11sp" >
+ android:textSize="10sp" >
</TextView>
<LinearLayout
diff --git a/res/values-v14/style.xml b/res/values-v14/style.xml index dc254c41..c1039f9c 100644 --- a/res/values-v14/style.xml +++ b/res/values-v14/style.xml @@ -6,15 +6,17 @@ <item name="headlinesBackground"><!-- #f0f0f0 -->@drawable/shadow_headlines</item>
<item name="headlinesBackgroundSolid">#f0f0f0</item>
<item name="articleBackground">#ffffff</item>
- <item name="headlineSelectedBackground">#ffffff</item>
+ <item name="headlineSelectedBackground">@drawable/headline_row_selected_light</item>
+ <item name="headlineSelectedBackgroundSolid">@color/headline_row_selected_light</item>
<item name="headlineUnreadBackground">@android:color/transparent</item>
<item name="headlineNormalBackground">@android:color/transparent</item>
- <item name="feedsSelectedBackground">#f0f0f0</item>
+ <item name="feedsSelectedBackground">@drawable/headline_row_selected_light</item>
+ <item name="feedsSelectedBackgroundSolid">@color/headline_row_selected_light</item>
<item name="feedlistTextColor">@android:color/primary_text_light</item>
- <item name="feedlistSelectedTextColor">@android:color/primary_text_light</item>
+ <item name="feedlistSelectedTextColor">#ffffff</item>
<item name="headlineTextColor">@android:color/secondary_text_light</item>
<item name="headlineUnreadTextColor">@android:color/primary_text_light</item>
- <item name="headlineSelectedTextColor">@android:color/primary_text_light</item>
+ <item name="headlineSelectedTextColor">#ffffff</item>
<item name="headlineExcerptTextColor">@android:color/secondary_text_light</item>
<item name="headlineSelectedExcerptTextColor">@android:color/secondary_text_light</item>
<item name="linkColor">#30B0E0</item>
@@ -26,16 +28,18 @@ <item name="unreadCounterColor">#303030</item>
<item name="headlinesBackground">@drawable/ics_divider_vertical</item>
<item name="headlinesBackgroundSolid">@android:color/transparent</item>
- <item name="articleBackground">@android:color/transparent</item>
- <item name="headlineSelectedBackground">@color/ics_cyan</item>
+ <item name="articleBackground">@android:color/black</item>
+ <item name="headlineSelectedBackground">@drawable/headline_row_selected_dark</item>
+ <item name="headlineSelectedBackgroundSolid">@color/ics_cyan</item>
<item name="headlineUnreadBackground">@android:color/transparent</item>
<item name="headlineNormalBackground">@android:color/transparent</item>
- <item name="feedsSelectedBackground">@color/ics_cyan</item>
+ <item name="feedsSelectedBackground">@drawable/headline_row_selected_dark</item>
+ <item name="feedsSelectedBackgroundSolid">@color/ics_cyan</item>
<item name="feedlistTextColor">@android:color/primary_text_dark</item>
<item name="feedlistSelectedTextColor">@android:color/black</item>
<item name="headlineTextColor">@android:color/secondary_text_dark</item>
<item name="headlineUnreadTextColor">@android:color/primary_text_dark</item>
- <item name="headlineSelectedTextColor">@android:color/black</item>
+ <item name="headlineSelectedTextColor">@android:color/white</item>
<item name="headlineExcerptTextColor">@android:color/secondary_text_dark</item>
<item name="headlineSelectedExcerptTextColor">@android:color/black</item>
<item name="linkColor">@color/ics_cyan</item>
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 @@ <attr name="headlinesBackgroundSolid" format="reference|color" />
<attr name="articleBackground" format="reference|color" />
<attr name="headlineSelectedBackground" format="reference|color" />
+ <attr name="headlineSelectedBackgroundSolid" format="reference|color" />
<attr name="headlineUnreadBackground" format="reference|color" />
<attr name="headlineNormalBackground" format="reference|color" />
<attr name="feedsSelectedBackground" format="reference|color" />
+ <attr name="feedsSelectedBackgroundSolid" format="reference|color" />
<attr name="feedlistTextColor" format="reference|color" />
<attr name="feedlistSelectedTextColor" format="reference|color" />
<attr name="headlineTextColor" format="reference|color" />
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 @@ <resources>
<color name="feeds_light">#e0e0e0</color>
- <color name="headlines_light">#f0f0f0</color>
+ <color name="headlines_light">#ffffff</color>
+ <color name="headline_row_selected_light">#33b5e5</color>
<color name="ics_cyan">#33b5e5</color>
</resources>
\ 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 @@ <item name="headlinesBackgroundSolid">#ffffff</item>
<item name="articleBackground">@android:color/transparent</item>
<item name="headlineSelectedBackground">#fff7d5</item>
+ <item name="headlineSelectedBackgroundSolid">#fff7d5</item>
<item name="headlineUnreadBackground">#ffffff</item>
<item name="headlineNormalBackground">#f0f0f0</item>
<item name="feedsSelectedBackground">#96C5FF</item>
+ <item name="feedsSelectedBackgroundSolid">#96C5FF</item>
<item name="feedlistTextColor">@android:color/primary_text_light</item>
<item name="feedlistSelectedTextColor">@android:color/primary_text_light</item>
<item name="headlineTextColor">@android:color/primary_text_light</item>
@@ -29,9 +31,11 @@ <item name="headlinesBackgroundSolid">#000000</item>
<item name="articleBackground">@android:color/transparent</item>
<item name="headlineSelectedBackground">#F5B800</item>
+ <item name="headlineSelectedBackgroundSolid">#F5B800</item>
<item name="headlineUnreadBackground">#303030</item>
<item name="headlineNormalBackground">@android:color/transparent</item>
<item name="feedsSelectedBackground">#F5B800</item>
+ <item name="feedsSelectedBackgroundSolid">#F5B800</item>
<item name="feedlistTextColor">@android:color/primary_text_dark</item>
<item name="feedlistSelectedTextColor">@android:color/primary_text_dark</item>
<item name="headlineTextColor">@android:color/primary_text_dark</item>
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(); } |