mirror of
https://github.com/MinimalBible/MinimalBible
synced 2025-07-05 15:54:44 -04:00
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:
27
app/src/main/res/layout/list_navigation_drawer.xml
Normal file
27
app/src/main/res/layout/list_navigation_drawer.xml
Normal 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>
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user