
The previous dependency extended the support library bottom nav. It did this at the expense of lots of reflection. This is pretty brittle and likely to break in future releases as the support lib gets updated. In the mean time we need to have a fully working bottom nav, so this commit includes a different dependency. Most 3rd party bottom navigation panes look great. All that I found require at least API 11, mostly API 14 (due to animations I suspect). I've forked one of the most popular ones on GitHub and made it support back down to API 10. My fork is added as a dependency until upstream accepts the PR. If they don't ever, then we can reconsider what our options are. The two times I've swapped the bottom nav implementation have both been trivial. The code generally only touches the MainActivity and its layout.
24 lines
975 B
XML
24 lines
975 B
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
android:orientation="vertical"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<com.ashokvarma.bottomnavigation.BottomNavigationBar
|
|
android:id="@+id/bottom_navigation"
|
|
app:menu="@menu/main_activity_screens"
|
|
android:layout_alignParentBottom="true"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content" />
|
|
|
|
<android.support.v7.widget.RecyclerView
|
|
android:id="@+id/main_view_pager"
|
|
android:layout_alignParentTop="true"
|
|
android:layout_above="@+id/bottom_navigation"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
tools:listitem="@layout/main_tab_whats_new" />
|
|
|
|
</RelativeLayout> |