ThreePhasesBottomSheet icon indicating copy to clipboard operation
ThreePhasesBottomSheet copied to clipboard

Bug in your MyFragment class

Open rgraf20 opened this issue 9 years ago • 2 comments

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

rgraf20 avatar Feb 29 '16 11:02 rgraf20

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.

AndroidDeveloperLB avatar Feb 29 '16 12:02 AndroidDeveloperLB

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.

rgraf20 avatar Feb 29 '16 14:02 rgraf20