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); }
private void hideScrollViewMenu(View scrollViewMenu) { if (scrollViewMenu != null && scrollViewMenu.getParent() != null) { removeView(scrollViewMenu); } }
private void showScrollViewMenu(View scrollViewMenu) { if (scrollViewMenu != null && scrollViewMenu.getParent() == null) { addView(scrollViewMenu); } }