layout/style update (add selection marker arrowheads)
This commit is contained in:
parent
0c5f68c079
commit
db782c0435
BIN
res/drawable-hdpi/arrowhead_dark.png
Normal file
BIN
res/drawable-hdpi/arrowhead_dark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 279 B |
BIN
res/drawable-hdpi/arrowhead_light.png
Normal file
BIN
res/drawable-hdpi/arrowhead_light.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
11
res/drawable/headline_row_selected_dark.xml
Normal file
11
res/drawable/headline_row_selected_dark.xml
Normal file
@ -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>
|
11
res/drawable/headline_row_selected_light.xml
Normal file
11
res/drawable/headline_row_selected_light.xml
Normal file
@ -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>
|
@ -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" >
|
||||
|
||||
|
38
res/layout-xlarge/feeds_row_selected.xml
Normal file
38
res/layout-xlarge/feeds_row_selected.xml
Normal file
@ -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>
|
@ -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"
|
||||
|
@ -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">
|
||||
|
||||
|
@ -1,8 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<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>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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" />
|
||||
|
@ -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>
|
@ -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>
|
||||
|
@ -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))
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user