Android Open Source - NavigationDrawerSI Navigation Drawer View






From Project

Back to project page NavigationDrawerSI.

License

The source code is released under:

Apache License

If you think the Android project NavigationDrawerSI listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package mmbialas.pl.navigationdrawersi.ui.navigationdrawer;
//  w ww  .  j a va  2 s.  c  o  m
import android.content.Context;
import android.util.AttributeSet;
import android.widget.ListView;

import java.util.List;

import butterknife.ButterKnife;
import butterknife.InjectView;
import mmbialas.pl.navigationdrawersi.R;
import mmbialas.pl.navigationdrawersi.data.model.NavigationDrawerItem;
import mmbialas.pl.navigationdrawersi.ui.misc.BetterViewAnimator;

/**
 * Created by Michal Bialas on 19/07/14.
 */
public class NavigationDrawerView extends BetterViewAnimator {

    @InjectView(R.id.leftDrawerListView)
    ListView leftDrawerListView;

    private final NavigationDrawerAdapter adapter;


    public NavigationDrawerView(Context context, AttributeSet attrs) {
        super(context, attrs);
        adapter = new NavigationDrawerAdapter(context);
    }

    public void replaceWith(List<NavigationDrawerItem> items) {
        adapter.replaceWith(items);
        setDisplayedChildId(R.id.leftDrawerListView);
    }

    @Override
    protected void onFinishInflate() {
        super.onFinishInflate();
        ButterKnife.inject(this);
        leftDrawerListView.setAdapter(adapter);
    }

    public NavigationDrawerAdapter getAdapter() {
        return adapter;
    }
}




Java Source Code List

mmbialas.pl.navigationdrawersi.ApplicationTest.java
mmbialas.pl.navigationdrawersi.data.Fragments.java
mmbialas.pl.navigationdrawersi.data.model.NavigationDrawerItem.java
mmbialas.pl.navigationdrawersi.ui.MainActivity.java
mmbialas.pl.navigationdrawersi.ui.fragments.FragmentAbout.java
mmbialas.pl.navigationdrawersi.ui.fragments.FragmentOne.java
mmbialas.pl.navigationdrawersi.ui.fragments.FragmentThree.java
mmbialas.pl.navigationdrawersi.ui.fragments.FragmentTwo.java
mmbialas.pl.navigationdrawersi.ui.misc.BetterViewAnimator.java
mmbialas.pl.navigationdrawersi.ui.misc.BindableAdapter.java
mmbialas.pl.navigationdrawersi.ui.navigationdrawer.NavigationDrawerAdapter.java
mmbialas.pl.navigationdrawersi.ui.navigationdrawer.NavigationDrawerItemView.java
mmbialas.pl.navigationdrawersi.ui.navigationdrawer.NavigationDrawerView.java