@@ -0,0 +1,3150 @@
+package com.alsash.reciper.ui;%0A%0Aimport android.os.Bundle;%0Aimport android.support.annotation.NonNull;%0Aimport android.support.design.widget.FloatingActionButton;%0Aimport android.support.design.widget.NavigationView;%0Aimport android.support.design.widget.Snackbar;%0Aimport android.support.design.widget.TabLayout;%0Aimport android.support.v4.app.FragmentManager;%0Aimport android.support.v4.view.GravityCompat;%0Aimport android.support.v4.view.PagerAdapter;%0Aimport android.support.v4.view.ViewPager;%0Aimport android.support.v4.widget.DrawerLayout;%0Aimport android.support.v7.app.ActionBarDrawerToggle;%0Aimport android.support.v7.app.AppCompatActivity;%0Aimport android.support.v7.widget.Toolbar;%0Aimport android.view.MenuItem;%0Aimport android.view.View;%0A%0Aimport com.alsash.reciper.R;%0A%0Apublic abstract class DrawerActivity extends AppCompatActivity%0A        implements NavigationView.OnNavigationItemSelectedListener %7B%0A%0A    protected abstract PagerAdapter getPagerAdapter(FragmentManager fm);%0A%0A    protected abstract void setupFab(FloatingActionButton fab);%0A%0A    @Override%0A    protected void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A%0A        setContentView(R.layout.activity_drawer_tab);%0A%0A        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);%0A        setSupportActionBar(toolbar);%0A%0A        FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);%0A        setupFab(fab);%0A        fab.setOnClickListener(new View.OnClickListener() %7B%0A            @Override%0A            public void onClick(View view) %7B%0A                Snackbar.make(view, %22Replace with your own action%22, Snackbar.LENGTH_LONG)%0A                        .setAction(%22Action%22, null).show();%0A            %7D%0A        %7D);%0A%0A        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);%0A        ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawer, toolbar,%0A                R.string.drawer_open, R.string.drawer_close);%0A        drawer.addDrawerListener(toggle);%0A        toggle.syncState();%0A%0A        NavigationView navigationView = (NavigationView) findViewById(R.id.drawer_nav);%0A        navigationView.setNavigationItemSelectedListener(this);%0A%0A        // Set up the ViewPager with the implemented PagerAdapter.%0A        ViewPager viewPager = (ViewPager) findViewById(R.id.tab_container);%0A        viewPager.setAdapter(getPagerAdapter(getSupportFragmentManager()));%0A%0A        TabLayout tabLayout = (TabLayout) findViewById(R.id.tabs);%0A        tabLayout.setupWithViewPager(viewPager);%0A    %7D%0A%0A    @Override%0A    public void onBackPressed() %7B%0A        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);%0A        if (drawer.isDrawerOpen(GravityCompat.START)) %7B%0A            drawer.closeDrawer(GravityCompat.START);%0A        %7D else %7B%0A            super.onBackPressed();%0A        %7D%0A    %7D%0A%0A    @Override%0A    public boolean onNavigationItemSelected(@NonNull MenuItem item) %7B%0A        // Handle navigation view item clicks here.%0A        int id = item.getItemId();%0A%0A        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);%0A        drawer.closeDrawer(GravityCompat.START);%0A        return true;%0A    %7D%0A%7D%0A

Add abstract activities for navigation drawer implementation