Add a highlighting Navbar on the front page

Used to help orient people scrolling through books, in a way that is colorful. Shading the background of a list item is also totally a possibility.
This commit is contained in:
Bradlee Speice
2014-07-13 22:43:54 -04:00
parent d85182a76f
commit 28227f2ef3
7 changed files with 141 additions and 286 deletions

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/navlist_selected_highlight"
android:minHeight="@dimen/navigation_drawer_highlight_height"
android:minWidth="24dp"
android:layout_gravity="center_vertical|right"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"/>
<!-- Largely taken from simple_list_item_1.xml -->
<TextView
style="?android:attr/textAppearanceListItemSmall"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:gravity="center_vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/navlist_content" />
</LinearLayout>

View File

@ -2,4 +2,6 @@
<resources>
<color name="statusbar">#dddddd</color>
<color name="actionbar">#ffffff</color>
<color name="navbar_highlight">#cc0000</color>
<color name="navbar_unhighlighted">#00cc0000</color>
</resources>

View File

@ -6,4 +6,6 @@
<!-- Per the design guidelines, navigation drawers should be between 240dp and 320dp:
https://developer.android.com/design/patterns/navigation-drawer.html -->
<dimen name="navigation_drawer_width">240dp</dimen>
<dimen name="navigation_drawer_highlight_height">32dp</dimen>
</resources>