2017-03-04 116 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)));}} }' –