Exemplo n.º 1
0
  private void initValue(Activity activity) {
    this.activity = activity;
    leftMenuItems = new ArrayList<ResideMenuItem>();
    rightMenuItems = new ArrayList<ResideMenuItem>();
    ignoredViews = new ArrayList<View>();
    viewDecor = (ViewGroup) activity.getWindow().getDecorView();
    viewActivity = new TouchDisableView(this.activity);

    View mContent = viewDecor.getChildAt(0);
    viewDecor.removeViewAt(0);
    viewActivity.setContent(mContent);
    addView(viewActivity);

    ViewGroup parent = (ViewGroup) scrollViewLeftMenu.getParent();
    parent.removeView(scrollViewLeftMenu);
    parent.removeView(scrollViewRightMenu);
  }
Exemplo n.º 2
0
 private void hideScrollViewMenu(View scrollViewMenu) {
   if (scrollViewMenu != null && scrollViewMenu.getParent() != null) {
     removeView(scrollViewMenu);
   }
 }
Exemplo n.º 3
0
 private void showScrollViewMenu(View scrollViewMenu) {
   if (scrollViewMenu != null && scrollViewMenu.getParent() == null) {
     addView(scrollViewMenu);
   }
 }