RecyclerView가 스크롤 될 때마다 도구 모음을 숨기려면 CoordinatorLayout 및이 코드 줄 (app:layout_scrollFlags="scroll|enterAlways"
)을 사용하고 있습니다. 그리고 이것은 또한 잘 작동하지만 툴바는 투명하기 때문에 상태 표시 줄 뒤에 감추어지지 않습니다. 이미 인터넷을 검색 단지에 대해 많은 것들을 발견 이후상태 표시 줄을 투명하게 만드는 방법 (Android 5)
내 레이아웃이
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.yannisbecker.backup.MainActivity">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/appbar_padding_top"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways" />
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center|bottom"
android:layout_margin="@dimen/fab_margin"
android:src="@drawable/ic_backup_white_24dp"/>
</android.support.design.widget.CoordinatorLayout>
처럼 보인다 "어떻게 할 수있는 상태 표시 투명"나는 지금 여기 물어 누군가가 도움이 될 수 있습니다 희망하고있어 나를.
것은 내가 한 정도로 명성이없는, 그러나 당신은 재활용 뷰 스크롤 할 때 상태 표시 줄 아래에있는 도구 모음을 숨기려면, 당신은 '당신에게 다음, 쇼에게 이미지 내 문제 here
XML 레이아웃 코드를 게시해야합니다. –
지금 레이아웃을 추가했습니다 – Steve2955