All Projects → QArtur99 → NavigationHeader

QArtur99 / NavigationHeader

Licence: MIT license
Navigation Header library based on MotionLayout inspired by dribble menu design built with MotionLayout and ObjectAnimator.

Programming Languages

kotlin
9241 projects
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to NavigationHeader

Androidnavigation
A library managing navigation, nested Fragment, StatusBar, Toolbar for Android
Stars: ✭ 636 (+1530.77%)
Mutual labels:  navigation, toolbar
Appearancenavigationcontroller
Example with advanced configuration of the navigation controller's appearance
Stars: ✭ 91 (+133.33%)
Mutual labels:  navigation, toolbar
Customnavigationbarsample
Navigation Bar Customization in Xamarin Forms
Stars: ✭ 104 (+166.67%)
Mutual labels:  navigation, toolbar
Snap-Assist
MacOS toolbar utility application that makes window management easier.
Stars: ✭ 17 (-56.41%)
Mutual labels:  toolbar
navbar.js
Modern Navigation Component
Stars: ✭ 47 (+20.51%)
Mutual labels:  navigation
graphhopper-navigation-example
GraphHopper Navigation as App
Stars: ✭ 72 (+84.62%)
Mutual labels:  navigation
robo-vln
Pytorch code for ICRA'21 paper: "Hierarchical Cross-Modal Agent for Robotics Vision-and-Language Navigation"
Stars: ✭ 34 (-12.82%)
Mutual labels:  navigation
micvision
Micvision package provide exploration and location for robot using navigation and cartographer packages
Stars: ✭ 21 (-46.15%)
Mutual labels:  navigation
atom-toolbar-almighty
Atom editor's missing toolbar
Stars: ✭ 21 (-46.15%)
Mutual labels:  toolbar
more-menu-fields
Package to add more fields to WordPress menu edit screen.
Stars: ✭ 30 (-23.08%)
Mutual labels:  navigation
SimpleToolbar
Custom Android Toolbar
Stars: ✭ 22 (-43.59%)
Mutual labels:  toolbar
hfos-legacy
Hackerfleet Operating System
Stars: ✭ 28 (-28.21%)
Mutual labels:  navigation
Jade-Player
A media player for Android.
Stars: ✭ 70 (+79.49%)
Mutual labels:  motionlayout
surfacer
AI and pathfinding for 2D-platformers in Godot.
Stars: ✭ 56 (+43.59%)
Mutual labels:  navigation
navigation2 tutorials
Tutorial code referenced in https://navigation.ros.org/
Stars: ✭ 60 (+53.85%)
Mutual labels:  navigation
routing-py
🌎 Python library to access all public routing, isochrones and matrix APIs in a consistent manner.
Stars: ✭ 106 (+171.79%)
Mutual labels:  navigation
android-deeplink-navigation
Example Android Application with (simplified) Deeplink Navigation.
Stars: ✭ 39 (+0%)
Mutual labels:  navigation
symfony-debug-toolbar-git
Get the latest Git commit information into Symfony debug toolbar
Stars: ✭ 30 (-23.08%)
Mutual labels:  toolbar
Dual-color-Polyline-Animation
This library will help to show the polyline in dual color similar as Uber.
Stars: ✭ 73 (+87.18%)
Mutual labels:  navigation
Smooth-Navigation
提供流畅的 Jetpack Navigation 转场体验。并解决 GitHub 上 Navigation Add Hide 修改版普遍存在的致命缺陷。
Stars: ✭ 204 (+423.08%)
Mutual labels:  navigation

Navigation Header

Navigation Header inspired by dribble menu built with MotionLayout and ObjectAnimator.

Screenshots

v1 h1

Setup

Add it in project root build.gradle:

	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

Add the dependency in app build.gradle:

	dependencies {
	        ...
	        implementation 'com.github.QArtur99:NavigationHeader:1.0.1'
	}

Usage

You need to include child layout inside parent layout (ConstraintLayout, RelativeLayout):

    <com.artf.navigationheader.NavigationHeaderLayout
            android:id="@+id/navigationHeader"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar"
            app:headerHeight="?attr/actionBarSize"
            app:baseElevation="6dp"
            app:animationDuration="500"
            app:layoutDescription="@xml/motion_scene"/>

Attributes

  • app:headerHeight - header size on collapse.
  • app:baseElevation - elevation of header on collapse. (optional)
  • app:animationDuration - duration of animation on state change. (optional)
  • app:layoutDescription - motion scene for Layout.

Create empty MotionScene in res/xml

            <MotionScene/>

In activity file

Create Header (statusBar and content colors are optional)

        val titleList = mutableListOf<Header>().apply {
            add(Header(title1, R.color.header1, R.color.statusBar1, R.color.content1))
            add(Header(title2, R.color.header2, R.color.statusBar2, R.color.content2))
            ...
        }

Create HeaderView

        titleList.forEach {
            val headerView = layoutInflater.inflate(R.layout.header, null)
            headerView.tag = it.title
            headerView.title.text = it.title
            headerView.setBackgroundColor(ContextCompat.getColor(this, it.headerColor!!))
            headerList.add(HeaderView(headerView, it.headerColor, it.statusBarColor, it.contentColor))
        }

Create List of content views (optional)

        val contentList = mutableListOf<View>().apply {
            add(c1)
            add(c2)
            ...
        }

Create listeners

        navigationHeader.setOnCollapseListener {
            when(it.tag){
                title1 -> {}
                title2 -> {}
                ...
            }
        }

Init NavigationHeader

        navigationHeader.initNavigationHeader(this, headerList, contentList)

Extra settings

Arrow color

        navigationHeader.arrow.setColorFilter(Color.BLACK)

Arrow invisible

        navigationHeader.arrow.setImageDrawable(null)

For more information see simple app included in this repo

Features

  • ActionBar stack menu animation with MotionLayout.
  • Menu element elevation animation with ObjectAnimator.
  • Menu arrow fade in/out animation with ObjectAnimator.
  • StatusBar color animation with ObjectAnimator.
  • Content elements color animation with ObjectAnimator
  • Menu element ripple effect.

How to run the project in development mode

  • Clone or download repository as a zip file.
  • Open project in Android Studio.
  • Run 'app' SHIFT+F10.

Report issues

Something not working quite as expected? Do you need a feature that has not been implemented yet? Check the issue tracker and add a new one if your problem is not already listed. Please try to provide a detailed description of your problem, including the steps to reproduce it.

License

Navigation Header is released under the MIT license. See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].