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

布局与底部导航栏重叠的问题 #1024

Open
spencerlishaobing opened this issue Aug 23, 2022 · 1 comment
Open

布局与底部导航栏重叠的问题 #1024

spencerlishaobing opened this issue Aug 23, 2022 · 1 comment

Comments

@spencerlishaobing
Copy link

自问自答
build()之前调用setDecorView即可
activity中如下

.setDecorView(activity.getWindow().getDecorView().findViewById(android.R.id.content))
                .build();

Frament中类似 下面是demo中的例子:

 public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        mView = inflater.inflate(R.layout.fragment_test, null);
        return mView;
    }


    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        mFrameLayout = (FrameLayout) mView.findViewById(R.id.fragmen_fragment);
    }

 .setDecorView(mFrameLayout)//非dialog模式下,设置ViewGroup, pickerView将会添加到这个ViewGroup中
@ninglanpeng
Copy link

试了没做用啊

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