2017-11-09 16:25:14 +00:00
<!-- A DrawerLayout is intended to be used as the top - level content view using match_parent for both width and height to consume the full space available. -->
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
2017-04-20 13:33:33 +00:00
xmlns:tools="http://schemas.android.com/tools"
2017-11-09 16:25:14 +00:00
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer_layout"
2017-04-20 13:33:33 +00:00
android:layout_width="match_parent"
2017-11-09 16:25:14 +00:00
android:layout_height="match_parent"
tools:context="com.habitrpg.android.habitica.ui.activities.MainActivity">
2017-04-20 13:33:33 +00:00
2017-11-09 16:25:14 +00:00
<!-- As the main content view, the view below consumes the entire
space available using match_parent in both dimensions. -->
<FrameLayout android:layout_width= "match_parent"
android:layout_height="match_parent">
<android.support.design.widget.CoordinatorLayout
android:id="@+id/coordinatorLayout"
2017-04-20 13:33:33 +00:00
android:layout_width="match_parent"
android:layout_height="match_parent"
2017-11-09 16:25:14 +00:00
tools:context=".ui.activities.MainActivity"
android:fitsSystemWindows="false">
2017-04-20 13:33:33 +00:00
2017-11-09 16:25:14 +00:00
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
2017-04-20 13:33:33 +00:00
2017-11-09 16:25:14 +00:00
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
2017-04-20 13:33:33 +00:00
android:layout_width="match_parent"
2017-11-09 16:25:14 +00:00
android:layout_height="wrap_content">
2017-04-20 13:33:33 +00:00
2017-11-09 16:25:14 +00:00
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
2017-04-20 13:33:33 +00:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
2017-11-09 16:25:14 +00:00
app:titleEnabled="false"
app:contentScrim="?attr/colorPrimary"
app:expandedTitleMarginEnd="?attr/actionBarSize"
app:expandedTitleMarginStart="0dp"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<include
android:id="@+id/avatar_with_bars"
layout="@layout/avatar_with_bars"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="?attr/actionBarSize"
app:layout_collapseMode="parallax" />
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:theme="@style/Toolbar"
app:layout_collapseMode="pin"
app:popupTheme="@style/Theme.AppCompat.Light">
<RelativeLayout
2017-07-20 17:59:59 +00:00
android:layout_width="wrap_content"
android:layout_height="match_parent"
2017-11-09 16:25:14 +00:00
android:layout_marginRight="16dp">
<TextView
android:id="@+id/toolbar_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:ellipsize="end"
android:maxLines="1"
android:singleLine="true"
style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
tools:text="Habitica"/>
2017-07-20 17:59:59 +00:00
2017-11-09 16:25:14 +00:00
<FrameLayout
android:id="@+id/toolbar_accessory_container"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:adjustViewBounds="true"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"/>
</RelativeLayout>
2017-07-20 17:59:59 +00:00
</android.support.v7.widget.Toolbar>
2017-11-09 16:25:14 +00:00
</android.support.design.widget.CollapsingToolbarLayout>
2017-04-20 13:33:33 +00:00
2017-11-09 16:25:14 +00:00
<android.support.design.widget.TabLayout
android:id="@+id/detail_tabs"
android:layout_width="match_parent"
android:layout_height="54dp"
android:layout_gravity="bottom"
android:background="@color/brand_200"
android:elevation="0dp"
android:fillViewport="false"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:layout_anchor="@+id/collapsing_toolbar"
app:layout_anchorGravity="bottom"
app:layout_collapseMode="pin"
app:tabGravity="fill"
app:tabIndicatorColor="@android:color/white"
app:tabMode="fixed" />
</android.support.design.widget.AppBarLayout>
<LinearLayout
android:id="@+id/bottom_wrapper"
2017-04-20 13:33:33 +00:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
2017-11-09 16:25:14 +00:00
android:orientation="vertical"
android:layout_gravity="bottom|center_horizontal"
android:layout_alignParentBottom="true"
app:layout_behavior="com.habitrpg.android.habitica.ui.helpers.FloatingActionMenuBehavior"
android:padding="0dp">
<android.support.design.widget.CoordinatorLayout
android:id="@+id/floating_menu_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:layout_marginBottom="-5dp"
/>
<com.roughike.bottombar.BottomBar
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="@color/brand_100"
app:bb_tabXmlResource="@xml/main_menu_tasks"
app:bb_inActiveTabColor="@color/brand_500"
app:bb_activeTabColor="@color/white"
app:bb_behavior="underNavbar"
app:bb_badgesHideWhenActive="true"
app:bb_badgeBackgroundColor="@color/brand_400"
android:layout_gravity="bottom"
android:layout_margin="0dp"
/>
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/overlayFrameLayout"
android:clickable="false"
android:fitsSystemWindows="true"
/>
</FrameLayout>
<!-- The drawer is given a fixed width in dp and extends the full height of
the container. -->
<fragment
android:id="@+id/navigation_drawer"
android:name="com.habitrpg.android.habitica.ui.fragments.NavigationDrawerFragment"
2017-04-20 13:33:33 +00:00
android:layout_width="match_parent"
android:layout_height="match_parent"
2017-11-09 16:25:14 +00:00
android:layout_gravity="start"
android:layout_marginRight="32dp"
tools:layout="@layout/drawer_main"/>
</android.support.v4.widget.DrawerLayout>