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

Custom view show animation #13

Closed
jianghao1123 opened this issue Oct 16, 2015 · 7 comments
Closed

Custom view show animation #13

jianghao1123 opened this issue Oct 16, 2015 · 7 comments

Comments

@jianghao1123
Copy link

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

@Kennyc1012
Copy link
Owner

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

@jianghao1123
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

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

@Kennyc1012
Copy link
Owner

Any chance of seeing an example, a video perhaps?

@caoyy
Copy link

caoyy commented Sep 29, 2016

how can i solve it?

@Kennyc1012
Copy link
Owner

Fixed in 2.4.1

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

No branches or pull requests

3 participants