My BottomSheetDialogFragment
opens half (mean not fully) when I open it.
fragment.show(supportFragmentManager, "my_frag")
- I tried
NestedScrollView
withbehavior_peekHeight
but did not work. - Tried without
NestedScrollView
. with onlyLinearLayout
. - Tried switching height between
match_parent
&wrap_content
I have simple RecyclerView
in BottomSheetDialogFragment
layout.
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
...
>
<android.support.v7.widget.RecyclerView
...
/>
Best Answer
By
BottomSheetFragment
you meanBottomSheetDialogFragment
. To open expended sheet you need to make some changes inonCreateDialog()
.Just keep the layout
match_parent
no need to useNestedScrollView
. It worked for me . Let me know if you still face problem .In case someone is using New Material library . Which is
implementation 'com.google.android.material:material:1.0.0'
. Then you need change the id of ParentFrameLayout
. So it will be .Make sure all your imports from
import com.google.android.material
in this case.