Closed jianghao1123 closed 6 years ago
I'm not sure if this is a bug or a feature request.
I'm trying to modify like this: window.setLayout(width <= 0 ? ViewGroup.LayoutParams.MATCH_PARENT : width, mBuilder.view != null ? ViewGroup.LayoutParams.MATCH_PARENT : ViewGroup.LayoutParams.WRAP_CONTENT); and this is custom view layout:
View view = LayoutInflater.from(getContext()) .inflate(R.layout.bottom_sheet_custom_layout, null); view.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dismiss(); } }); CollapsingView collapsingView = (CollapsingView) view.findViewById(R.id.collapsingView); collapsingView.setCollapseListener(this); mBuilder.view.setBackgroundColor(ta.getColor(0, Color.WHITE)); collapsingView.addView(mBuilder.view); setContentView(view);
You don't need to add a CollapsingView to your custom layout. It will automatically be wrapped when created https://github.com/Kennyc1012/BottomSheet/blob/master/library/src/main/java/com/kennyc/bottomsheet/BottomSheet.java#L212
I know, i just find the animation of bottom show is not correct sometimes,It's a bit unstable.
Any chance of seeing an example, a video perhaps?
how can i solve it?
Fixed in 2.4.1
Sometimes custom view's animation will be quickly that is different from default.