다음 코드를 코디네이터 레이아웃에서 사용했으며 사용자 정의 축소 도구 모음 디자인을 사용하고 있습니다. 내가 낮은 OS 버전에이 응용 프로그램을 실행할 때 모든 viewpager 조각 Recyclerviews에 스크롤하는 동안Recyclerview 중첩 된 스크롤보기 내부에있는 ViewPager
<?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:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="RtlHardcoded">
<android.support.design.widget.AppBarLayout
android:id="@+id/main.appbar"
android:layout_width="match_parent"
android:layout_height="250dp"
android:background="@drawable/backg">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/main.collapsing"
android:layout_width="match_parent"
android:layout_height="250dp"
app:contentScrim="?attr/colorPrimary"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">
<FrameLayout
android:id="@+id/main.framelayout.title"
android:layout_width="match_parent"
android:layout_height="130dp"
android:layout_gravity="bottom"
android:background="#00000000"
android:orientation="vertical"
app:layout_collapseMode="parallax"
app:layout_collapseParallaxMultiplier="0.3">
<LinearLayout
android:id="@+id/main.linearlayout.title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="30dp"
android:layout_gravity="left"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="bottom"
android:text="User Name"
android:id="@+id/username"
android:textColor="@android:color/white"
android:textSize="30sp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:id="@+id/business"
android:text="Users Business"
android:textColor="@android:color/white"/>
</LinearLayout>
</FrameLayout>
<android.support.v7.widget.Toolbar
android:id="@+id/main.toolbar"
android:layout_width="match_parent"
android:layout_height="110dp"
android:background="#00000000"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:title=""
app:layout_collapseMode="pin">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:id="@+id/back"
android:layout_marginTop="10dp"
android:background="@drawable/ic_arrow_back"/>
<TextView
android:id="@+id/main.textview.title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="12dp"
android:text="User Name"
android:textColor="@android:color/white"
android:textSize="24sp"
/>
</LinearLayout>
</android.support.v7.widget.Toolbar>
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#00000000"
android:layout_gravity="bottom"
app:tabMode="fixed"
app:tabGravity="fill"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:layout_gravity="fill_vertical"
android:fillViewport="true"
android:layout_marginBottom="110dp">
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_gravity="fill_vertical"
android:layout_height="match_parent"
android:background="@android:color/white">
</android.support.v4.view.ViewPager>
</android.support.v4.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout>
지금 내가이 직면하고있는 무슨 문제, 모든 괜찮지 만 난 Android.M 위의 OS를 사용하는 경우, recyclerview의 높이입니다 화면에 표시되지 않으며 항목이 화면에 표시 될 정도로 보이지 않습니다. 제 문제를 해결하도록 도와주세요. 내 맞춤식 축소 형 막대 레이아웃을 설계했지만 아래 Android OS에서는 모두 괜찮습니다. 난 내 액션 바 크기의 margin_bottom를 추가 할 때
[EDITED 여기
몇 가지 스냅 샷입니다.
< --- 스냅 샷 끝.
marginBottom을 사용할 때 viewpagers 높이가 화면 크기보다 작다는 것을 볼 수 있습니다.
지금
more higher varients의 경우 marginBottom을 사용하는 동안 모두 아래 사항을 준수해야합니다.
나는 scrollview를 이미 사용하고 있으며, 축소 도구 모음을 사용하고 있으므로 nestedscrollviewenabled = "true"와 함께 사용했지만 더 이상 작동하지 않습니다. 내가 직면하고있는 문제는 NestedScrollView 내부에서 유지되는 viewpage의 높이입니다. – ShockWave
새 코드를 추가했습니다. 그 중 하나를 선택하고 knw하자 – Anonymous
당신이 내게 말한 제안을 시도했지만, 내가 직면하고있는 문제는 viewPagers 높이입니다. fillViewPort = "true"를 중첩 된 스크롤 레이아웃에 추가하면 전체 높이를 차지하게되고, 이로 인해 recyclerview는 viewpager의 전체 높이를 차지하게되고 나머지 다른 항목은 화면을 출력하지만 heah, hack 내 도구 모음 높이의 marginBottom을 추가 할 때 제대로 작동하지만 지금은 문제가 더 낮은 버전과 같습니다 – ShockWave