CoordinatorLayout 导致布偶尔局乱掉

落幕-无悔 2017-12-20 05:25:33
我先上图给大家看



现在是本来的在底部的布局,悬浮在最上层了并在顶部了
...全文
286 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
落幕-无悔 2017-12-20
  • 打赏
  • 举报
回复 1
有人遇到过吗,自己顶一个
落幕-无悔 2017-12-20
  • 打赏
  • 举报
回复
这个请求出现的几率不怎么大,就偶尔出现,我个人认为是android.support.design.widget.CoordinatorLayout导致的
落幕-无悔 2017-12-20
  • 打赏
  • 举报
回复
我的整体布局

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
    <com.framework.widget.HRFrameLayout4Loading
        android:id="@+id/view_loading"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <com.framework.widget.smartrefresh.SmartRefreshLayout
            android:id="@+id/layout_refresh"
            android:layout_width="match_parent"
            android:layout_height="match_parent">
            <android.support.design.widget.CoordinatorLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical">
                <android.support.design.widget.AppBarLayout
                    android:id="@+id/app_bar_layout"
                    android:layout_width="match_parent"
                    android:layout_height="190dp"
                    android:visibility="visible"
                    app:layout_behavior="com.haier.hairy.ui.home.banner.FlingBehavior">
                    <android.support.design.widget.CollapsingToolbarLayout
                        android:id="@+id/collapsing_toolbar_layout"
                        android:layout_width="match_parent"
                        android:layout_height="190dp"
                        app:collapsedTitleGravity="center"
                        app:contentScrim="@color/title_bg"
                        app:expandedTitleMarginStart="@dimen/title_bar_default_height"
                        app:layout_scrollFlags="scroll|exitUntilCollapsed">
                        <!--scroll|snap|exitUntilCollapsed|enterAlwaysCollapsed-->
                        <!--头部广告栏-->
                        <com.framework.widget.convenientbanner.ConvenientBanner
                            android:id="@+id/convenientBanner"
                            android:layout_width="match_parent"
                            android:layout_height="190dp"
                            app:canLoop="true" />
                        <!--头部标题-->
                        <android.support.v7.widget.Toolbar
                            android:id="@+id/layout_toolbar"
                            android:layout_width="match_parent"
                            android:layout_height="@dimen/title_bar_default_height_title"
                            android:gravity="bottom"
                            android:minHeight="@dimen/title_bar_default_height"
                            app:contentInsetStart="0dp"
                            app:layout_collapseMode="pin">

                            <RelativeLayout
                                android:layout_width="match_parent"
                                android:layout_height="@dimen/title_bar_default_height">

                                <ImageView
                                    android:id="@+id/iv_logo"
                                    android:layout_width="68dp"
                                    android:layout_height="19dp"
                                    android:layout_centerInParent="true"
                                    android:src="@drawable/logo_hry" />

                                <LinearLayout
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_alignParentRight="true"
                                    android:layout_centerVertical="true"
                                    android:layout_marginRight="15dp"
                                    android:orientation="horizontal">

                                    <ImageView
                                        android:id="@+id/imgNav"
                                        android:layout_width="25dp"
                                        android:layout_height="25dp"
                                        android:layout_marginRight="20dp"
                                        android:scaleType="fitXY"
                                        android:visibility="gone" />

                                    <ImageView
                                        android:id="@+id/img_sign"
                                        android:layout_width="25dp"
                                        android:layout_height="25dp"
                                        android:scaleType="fitXY"
                                        android:visibility="gone" />
                                </LinearLayout>

                                <TextView
                                    android:id="@+id/tv_login"
                                    style="@style/text_14_white"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_alignParentRight="true"
                                    android:layout_centerVertical="true"
                                    android:layout_marginRight="15dp"
                                    android:text="登录"
                                    android:visibility="visible" />
                            </RelativeLayout>

                        </android.support.v7.widget.Toolbar>

                    </android.support.design.widget.CollapsingToolbarLayout>
                </android.support.design.widget.AppBarLayout>

                <android.support.v4.widget.NestedScrollView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:scrollbars="none"
                    android:visibility="visible"
                    app:layout_behavior="@string/appbar_scrolling_view_behavior">

                    <LinearLayout
                        android:id="@+id/layout_view"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:orientation="vertical">

                        <ImageView
                            android:id="@+id/image_activity"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:minHeight="120dp"
                            android:background="@color/white"
                            android:scaleType="fitXY"
                            android:src="@drawable/bg_banner_one"
                            android:visibility="gone" />
                        <!--新客与活动-->
                        <FrameLayout
                            android:id="@+id/fragment_activity_yorker_content"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content" />
                        <!--预约专区与精选投资合并在一起-->
                        <FrameLayout
                            android:id="@+id/fragment_appointment_or_investment"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content" />
                        <!--精选投资-->
                        <!--<FrameLayout-->
                        <!--android:id="@+id/fragment_selection_investment"-->
                        <!--android:layout_width="match_parent"-->
                        <!--android:layout_height="wrap_content"-->
                        <!--android:layout_marginTop="10dp"-->
                        <!--android:visibility="gone"-->
                        <!--android:background="@color/white" />-->
                        <!--会员交易区-->
                        <FrameLayout
                            android:id="@+id/fragment_member_trade"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="10dp"
                            android:background="@color/white" />
                        <FrameLayout
                            android:id="@+id/fragment_dynamics"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content" />
                    </LinearLayout>
                </android.support.v4.widget.NestedScrollView>
            </android.support.design.widget.CoordinatorLayout>
        </com.framework.widget.smartrefresh.SmartRefreshLayout>
    </com.framework.widget.HRFrameLayout4Loading>
</FrameLayout>

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧