Не отображать Full ViewerPager на CoordinatorLayout - PullRequest
0 голосов
/ 15 января 2019

Full ViewerPager не полностью отображается в CoordinatorLayout. Черный экран - это фрагмент, но он не отображается полностью. Все работает хорошо, за исключением проблемы, которую я сказал.

Скриншоты:

https://ibb.co/XSp3y0Y

https://ibb.co/Ctk1b1t

XML:

<?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:custom="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@android:color/background_light"
    android:fitsSystemWindows="true">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/main.appbar"
        android:layout_width="match_parent"
        android:layout_height="200dp"
        android:fitsSystemWindows="true"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

        <android.support.design.widget.CollapsingToolbarLayout
            android:id="@+id/main.collapsing"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:fitsSystemWindows="true"
            app:contentScrim="?attr/colorPrimary"
            app:expandedTitleMarginEnd="64dp"
            app:expandedTitleMarginStart="48dp"
            app:layout_scrollFlags="scroll|exitUntilCollapsed">


            <RelativeLayout
                android:id="@+id/sliderr"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:fitsSystemWindows="true"
                app:layout_collapseMode="parallax">


                <com.daimajia.slider.library.SliderLayout
                    android:id="@+id/slider"
                    android:layout_width="match_parent"
                    android:layout_height="200dp"
                    custom:auto_cycle="true"
                    custom:indicator_visibility="visible"
                    custom:pager_animation="Accordion"
                    custom:pager_animation_span="1100" />


                <com.daimajia.slider.library.Indicators.PagerIndicator
                    style="@style/AndroidImageSlider_Corner_Oval_Orange"
                    android:layout_alignParentBottom="true"
                    android:layout_centerHorizontal="true"
                    android:layout_marginBottom="20dp"
                    custom:selected_color="#0095BF"
                    custom:unselected_color="#55ffffff"

                    />



            </RelativeLayout>

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="?android:attr/actionBarSize">

                <ImageView
                    android:id="@+id/backs"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerVertical="true"
                    android:layout_marginLeft="10dp"
                    android:layout_marginTop="15dp"
                    android:src="@drawable/ic_back"
                    android:tint="@color/white" />


            </RelativeLayout>



        </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">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <LinearLayout
                android:id="@+id/laytitel"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_below="@+id/sliderr"
                android:background="@drawable/copongradient"
                android:orientation="vertical">


                <TextView
                    android:id="@+id/resname"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="right"
                    android:layout_marginRight="@dimen/text_normal"
                    android:layout_marginTop="5dp"
                    android:text="asdasdasd"
                    android:textColor="#ffffff"
                    android:textSize="18sp" />

                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:layout_alignParentRight="true"
                    android:layout_gravity="right"
                    android:layout_marginBottom="5dp"

                    >


                    <TextView
                        android:id="@+id/descs"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:text="category"
                        android:textColor="@color/white"
                        android:textSize="15sp" />

                    <ImageView
                        android:layout_width="20dp"
                        android:layout_height="20dp"
                        android:layout_alignParentRight="true"
                        android:layout_marginRight="6dp"
                        android:src="@drawable/ic_maps_place"
                        android:tint="@color/white" />


                </LinearLayout>


                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="10dp"
                    android:visibility="gone">

                    <RatingBar
                        android:id="@+id/ratingBar"
                        style="?android:ratingBarStyleSmall"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="right"
                        android:layout_marginLeft="1dp"
                        android:layout_marginRight="1dp"
                        android:layout_toLeftOf="@+id/ratingtotal"
                        android:isIndicator="true"
                        android:numStars="5"
                        android:rating="0"
                        android:theme="@style/RatingBar" />

                    <TextView
                        android:id="@+id/foodrating"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginRight="5dp"
                        android:layout_toLeftOf="@+id/ratingBar"
                        android:textColor="@color/white"
                        android:textSize="11sp" />

                    <TextView
                        android:id="@+id/ratingtotal"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentRight="true"
                        android:layout_marginRight="@dimen/text_normal"
                        android:textColor="@color/white"
                        android:textSize="11sp" />

                </RelativeLayout>


            </LinearLayout>

            <RelativeLayout
                android:id="@+id/tablayout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/laytitel">

                <android.support.design.widget.TabLayout
                    android:id="@+id/tablayouts"
                    android:layout_width="match_parent"
                    android:layout_height="43dp"
                    app:tabBackground="@color/white"
                    app:tabGravity="fill"
                    app:tabIndicatorColor="@color/dot_light_screen1"
                    app:tabMaxWidth="0dp"
                    app:tabSelectedTextColor="@color/dot_light_screen1"
                    app:tabTextColor="@color/gray_1" />

                <FrameLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:id="@+id/frame_container"
                    android:layout_below="@+id/tablayouts"
                    />







            </RelativeLayout>




        </RelativeLayout>



    </android.support.v4.widget.NestedScrollView>



    <android.support.design.widget.FloatingActionButton
        android:id="@+id/fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="25dp"
        android:layout_marginTop="25dp"
        android:clickable="true"
        android:src="@drawable/ic_navimap"
        android:tint="@color/colorPrimaryDark"
        app:backgroundTint="@color/white"
        app:layout_anchor="@id/main.appbar"
        app:layout_anchorGravity="bottom|left" />
</android.support.design.widget.CoordinatorLayout>
...