Bigkoo / Android-PickerView

This is a picker view for android , support linkage effect, timepicker and optionspicker.(时间选择器、省市区三级联动)
Apache License 2.0
13.44k stars 3.45k forks source link

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

Open spencerlishaobing opened 2 years ago

spencerlishaobing commented 2 years ago

自问自答 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 commented 10 months ago

试了没做用啊

FrankLove commented 2 months ago

有用