2017-03-04 121 views
1

我的动作栏隐藏片段的一部分,参见下文图像:部分机器人底部片隐藏

Actionbar hides under toolbar when bottom sheet is expanded

<LinearLayout 
    android:id="@+id/bottom_sheet" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    app:layout_behavior="android.support.design.widget.BottomSheetBehavior" 
    android:background="@android:color/white"> 
     <include android:id="@+id/itemised_bottom_sheet" layout="@layout/payment_itemised_list_layout" android:visibility="gone"/> 
     <include android:id="@+id/bottom_sheet_layout" layout="@layout/business_buttom_sheet_layout" android:visibility="gone"/> 
</LinearLayout> 

回答

0

使用机器人:layout_height = “WRAP_CONTENT” 而不是“match_parent “并确保底部表单内的内容的高度小于活动的视图

+0

尝试过,但对我无效。诀窍是暗淡安卓工具栏以全屏显示整个屏幕的视图,而不会从工具栏中断。如果(Build.VERSION.SDK_INT> = Build.VERSION_CODES.LOLLIPOP)if(dim)getWindow().setStatusBarColor(ContextCompat.getColor(this,android.R.color.transparent)),则返回 –

+0

以下的代码示例。 (),getThemedResId(R.attr.colorPrimaryDark)));其他{ }其他{ getWindow()。setStatusBarColor(ContextCompat.getColor(this,getThemedResId(R.attr.colorPrimaryDark))); (这个,Color.TRANSPARENT):ContextCompat.getColor(this,getThemedResId(R.attr.colorPrimaryDark)));}} }' –