Popularity
0.4
Stable
Activity
0.0
Stable
3
1
0

Description

EasySideNavigation is a library for making side navigation (navigation drawer) more easier.

Programming language: Java
License: Apache License 2.0
Tags: UI     Navigation     Android-library    
Latest version: v1.0.2

EasySideNavigation alternatives and similar packages

Based on the "Navigation" category.
Alternatively, view EasySideNavigation alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of EasySideNavigation or a related project?

Add another 'Navigation' Package

README

EasySideNavigation

Release

Requirements

Compile SDK Version 28
Target SDK Version 28
Build Tools Version 28.0.0

Gradle Dependency

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

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

Step 2. Add the dependency

Release

dependencies {
        implementation 'com.github.andiisfh:easy-side-navigation:${version}'
}

Usage

Extends your Activity to EasySideNavigation

public class MainActivity extends EasySideNavigation {
    ...
}

Setup all necessary function

...
    Toolbar mToolbar;

    // Set the main layout resource. It includes a toolbar
    @Override
    protected int setLayoutResource() {
        return R.layout.activity_main;
    }

    // Main layout has been inflated
    @Override
    protected void onViewReady(View view) {
        mToolbar = findViewById(R.id.toolbar);
    }

    // Set the toolbar
    @Override
    protected Toolbar setToolbar() {
        return mToolbar;
    }

    // Set the header navigation view layout resource
    @Override
    protected int setNavigationHeaderResource() {
        return R.menu.header_navigation_menu;
    }

    // Set the navigation menu resource
    @Override
    protected int setNavigationMenu() {
        return R.menu.navigation_menu;
    }

    // Get all navigation component, the menu & the header view
    @Override
    protected void getNavigationComponent(Menu menu, View headerView) {
        MenuItem nav_notification = menu.findItem(R.id.action_notification);

        nav_notification.setTitle("NewTitleForNotification");

        final TextView tvName = headerView.findViewById(R.id.tv_name);
        tvName.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(MainActivity.this, tvName.getText().toString(), Toast.LENGTH_SHORT).show();
            }
        });
    }

    // Listener when navigation item has been selected
    @Override
    protected void onNavigationItemSelected(MenuItem menuItem) {

    }
...

Done!

License

Apache License 2.0


*Note that all licence references and agreements mentioned in the EasySideNavigation README section above are relevant to that project's source code only.