Esempio n. 1
0
  private void initValue(Activity activity) {
    this.activity = activity;
    leftMenuItems = new ArrayList<ResideMenuItem>();
    rightMenuItems = new ArrayList<ResideMenuItem>();
    ignoredViews = new ArrayList<View>();
    // viewDecor是Activity 中最顶层的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);
  }
Esempio n. 2
0
 private void hideScrollViewMenu(ScrollView scrollViewMenu) {
   if (scrollViewMenu != null && scrollViewMenu.getParent() != null) {
     removeView(scrollViewMenu);
   }
 }
Esempio n. 3
0
 private void showScrollViewMenu(ScrollView scrollViewMenu) {
   if (scrollViewMenu != null && scrollViewMenu.getParent() == null) {
     addView(scrollViewMenu);
   }
 }