Kennyc1012 / BottomSheetMenu

BottomSheetMenu style dialogs for Android
Apache License 2.0
887 stars 99 forks source link

Custom view show animation #13

Closed jianghao1123 closed 6 years ago

jianghao1123 commented 9 years ago

Sometimes custom view's animation will be quickly that is different from default.

Kennyc1012 commented 9 years ago

I'm not sure if this is a bug or a feature request.

jianghao1123 commented 9 years ago

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: 2

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);

Kennyc1012 commented 9 years ago

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

jianghao1123 commented 9 years ago

I know, i just find the animation of bottom show is not correct sometimes,It's a bit unstable.

Kennyc1012 commented 9 years ago

Any chance of seeing an example, a video perhaps?

caoyy commented 8 years ago

how can i solve it?

Kennyc1012 commented 6 years ago

Fixed in 2.4.1