Bug in your MyFragment class
You have the following code:
mBottomSheetContentView.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(final View v)
{
mBottomSheetLayout.expandSheet();
}
});
The correct for me is this one:
mBottomSheetContentView.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(final View v)
{
if (mBottomSheetLayout.getState() == State.PEEKED) mBottomSheetLayout.expandSheet();
}
});
Because if you click the mBottomSheetContentView (in the imageView or in the textView) when the state is State.EXPANDED, you have a bug that resizes the image and puts the other textview element in a wrong position
As I remember, the imageView isn't visible when it's expanded, because it only appears at the bottom, when it's already peeked.
Anyway, Google has provided a new official API for bottom sheet: http://android-developers.blogspot.co.il/2016/02/android-support-library-232.html
I hope it's possible to do what I did, using their API.
I will try to make a video for explain better, sorry for my english.
Thanks for the response! I know the api it's only a little bug in your code.