Side Menu - 分类侧滑菜单


Apache
Android
Java

软件简介

Side Menu 是用于安卓的分类侧滑菜单。

示例代码:

    ViewAnimator viewAnimator = 
new ViewAnimator<>(ActionBarActivity.this,                                    
new ArrayList<Resourceble>(),
(LinearLayout) findViewById(R.id.left_drawer), 
contentFragment, drawerLayout);    
//to open menu you have to override ActionBarDrawerToggle method 
            @Override
            public void onDrawerSlide(View drawerView, float slideOffset) {                
              super.onDrawerSlide(drawerView, slideOffset);                
              if (slideOffset > 0.6 && viewAnimator.getLinearLayout().getChildCount() == 0)
                    viewAnimator.showMenuContent();
            }            public void onDrawerClosed(View view) {                
                super.onDrawerClosed(view);
                viewAnimator.getLinearLayout().removeAllViews();
                viewAnimator.getLinearLayout().invalidate();
            }