Tôi đang cố gắng triển khai Bố cục Thanh công cụ Thu gọn với các tùy chọn trình đơn nhưng bất cứ khi nào tôi đặt nguồn chế độ xem hình ảnh trong mã bên dưới, hình ảnh bao gồm menu và nút quay lại. Các tùy chọn có ở đó vì tôi có thể nhấp vào chúng, chúng chỉ bị ẩn bởi hình ảnh. Có ai biết làm thế nào để sửa lỗi này?Tùy chọn menu không hiển thị trên Thanh công cụ Thu gọn
XML Layout
<android.support.design.widget.AppBarLayout android:id="@+id/app_bar"
android:layout_width="match_parent" android:layout_height="@dimen/app_bar_height"
android:fitsSystemWindows="true"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.design.widget.CollapsingToolbarLayout android:id="@+id/toolbar_layout"
android:layout_width="match_parent" android:layout_height="match_parent"
android:fitsSystemWindows="true" app:contentScrim="?attr/colorPrimary"
app:layout_scrollFlags="scroll|exitUntilCollapsed" app:toolbarId="@+id/toolbar">
<android.support.v7.widget.Toolbar android:id="@+id/detail_toolbar"
android:layout_width="match_parent" android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
android:fitsSystemWindows="true"/>
<ImageView
android:src="@drawable/background"
app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
app:layout_collapseMode="parallax"
android:minHeight="100dp"
android:fitsSystemWindows="true"/>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
Đây có phải là điều phối viên không? – Simon
Có, tất cả hoạt động tốt ngoài các biểu tượng menu không hiển thị – Carl