Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

excellent work!I dump the view tree,found some layouts between decorView and contentView which are redundant. #37

Closed
whysqwhw opened this issue Nov 26, 2014 · 4 comments

Comments

@whysqwhw
Copy link

private void initValue(Activity activity) {
this.activity = activity;
leftMenuItems = new ArrayList();
rightMenuItems = new ArrayList();
ignoredViews = new ArrayList();

    viewDecor = (ViewGroup) activity.getWindow().getDecorView();
    viewActivity = new TouchDisableView(this.activity);
    // View mContent = viewDecor.getChildAt(0);
    // viewDecor.removeViewAt(0);
    ViewGroup contentView = (ViewGroup) (viewDecor.findViewById(android.R.id.content));
    View mContent = contentView.getChildAt(0);
    contentView.removeAllViews();
    viewDecor.removeAllViews();

    viewActivity.setContent(mContent);
    addView(viewActivity);

    ViewGroup parent = (ViewGroup) scrollViewLeftMenu.getParent();
    parent.removeView(scrollViewLeftMenu);
    parent.removeView(scrollViewRightMenu);
}
@whysqwhw whysqwhw changed the title excellent work!,I dump the view tree,found some layouts between decorView and contentView which are redundant excellent work!I dump the view tree,found some layouts between decorView and contentView which are redundant. Nov 26, 2014
@SpecialCyCi
Copy link
Owner

Great work! Could you create a pull request?

@whysqwhw
Copy link
Author

O,I see.Forgive my chinglish.

@SpecialCyCi
Copy link
Owner

Forgive my chinglish, too....

@SpecialCyCi
Copy link
Owner

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants