Giter VIP home page Giter VIP logo

appbarlayoutbehavior's People

Contributors

yuruiyin avatar zhanglihow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

appbarlayoutbehavior's Issues

你这个解决方案不就是 杨充 的方案吗,但是还是有问题

和 AppBarLayout 一起协作滚动的 兄弟可嵌套滚动的 view,比如 RecyclerView,在 RecyclerView fling 时,但是此时 AppBarLayout 还没滑出屏幕,此时 再去滚动 由于 shouldBlockNestedScroll 已经 为 true 会阻止 AppBarLayout 滚动,所以出现滚动断层现象!

多次滑动后滑动异常,无法滑动

    <android.support.design.widget.AppBarLayout
        android:id="@+id/appbar_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/white"
        app:elevation="0dp"
        app:layout_behavior="com.zygl.donehaitao.widgets.FixAppBarLayoutBehavior"

        >

       <!--  <android.support.design.widget.CollapsingToolbarLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             app:layout_scrollFlags="scroll|enterAlways"
             android:fitsSystemWindows="true">-->

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            app:layout_scrollFlags="scroll|enterAlways"
            >

            <ImageView
                android:id="@+id/iv_goods_image"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:scaleType="fitXY"
                android:adjustViewBounds="true"/>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="3"
                    android:background="@mipmap/price_bg"
                    android:orientation="vertical"
                    android:paddingLeft="16dp"
                    android:paddingTop="8dp"
                    android:paddingRight="8dp"
                    android:paddingBottom="8dp">

                    <RelativeLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="center_vertical">

                        <TextView
                            android:id="@+id/tv_price"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="¥  158"
                            android:textColor="@color/white"
                            android:textSize="18sp"
                            android:textStyle="bold" />

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:padding="2dp"
                            android:layout_alignParentRight="true"
                            android:background="@drawable/limit_time_bg"
                            android:text="限时促销"
                            android:textColor="@color/white"
                            android:textSize="14sp" />
                    </RelativeLayout>

                    <RelativeLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="center_vertical">

                        <TextView
                            android:id="@+id/old_price"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="原价"
                            android:visibility="gone"
                            android:textColor="@color/white"
                            android:textSize="14sp" />

                        <TextView
                            android:id="@+id/tv_old_price"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_toRightOf="@id/old_price"
                            android:text="¥  158"
                            android:textColor="@color/white"
                            android:textSize="14sp" />

                        <TextView
                            android:id="@+id/tv_integral"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_alignParentRight="true"
                            android:text="可获得D1积分:72"
                            android:textColor="@color/white"
                            android:textSize="14sp" />
                    </RelativeLayout>

                </LinearLayout>

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="2"
                    android:background="#feaeae"
                    android:gravity="center_horizontal">

                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:gravity="center_horizontal"
                        android:orientation="vertical">

                        <TextView
                            android:id="@+id/time_type"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:gravity="center_horizontal"
                            android:text="距离结束"
                            android:textColor="@color/support_color_2" />

                        <LinearLayout
                            android:id="@+id/time_linear"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_below="@id/txt_time_label"
                            android:layout_marginTop="5dp"
                            android:orientation="horizontal">

                            <TextView
                                android:id="@+id/time_day"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="00"
                                android:textColor="@color/support_color_2"
                                android:textSize="14sp" />

                            <TextView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="天"
                                android:textColor="@color/support_color_2"
                                android:textSize="14sp" />

                            <TextView
                                android:id="@+id/time_hour"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="00"
                                android:textColor="@color/support_color_2"
                                android:textSize="14sp" />

                            <TextView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="小时"
                                android:textColor="@color/support_color_2"
                                android:textSize="14sp" />

                            <TextView
                                android:id="@+id/time_minute"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="00"
                                android:textColor="@color/support_color_2"
                                android:textSize="14sp" />

                            <TextView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="分"
                                android:textColor="@color/support_color_2"
                                android:textSize="14sp" />

                            <TextView
                                android:id="@+id/time_second"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="00"
                                android:textColor="@color/support_color_2"
                                android:textSize="14sp" />

                            <TextView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="秒"
                                android:textColor="@color/support_color_2"
                                android:textSize="14sp" />

                        </LinearLayout>
                    </LinearLayout>


                </LinearLayout>
            </LinearLayout>

            <TextView
                android:id="@+id/title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingLeft="16dp"
                android:paddingRight="16dp"
                android:paddingTop="16dp"
                android:text=""
                android:textColor="@color/text_40"
                android:textSize="16sp"/>

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

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="16dp"
                    android:text="请选择规格" />

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="16dp"
                    android:layout_marginRight="16dp"
                    android:layout_marginBottom="16dp"
                    android:background="@drawable/shop_size_bg"
                    android:padding="8dp">

                    <com.zhy.view.flowlayout.TagFlowLayout
                        android:id="@+id/flow_layout"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        app:max_select="1"></com.zhy.view.flowlayout.TagFlowLayout>
                </RelativeLayout>
            </LinearLayout>

            <View
                android:layout_width="match_parent"
                android:layout_height="8dp"
                android:background="@color/text_ee" />

            <RelativeLayout
                android:id="@+id/rl_taxes"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:padding="16dp">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="税费"
                    android:textColor="@color/text_7f"
                    android:textSize="14sp" />

                <TextView
                    android:id="@+id/tv_taxes"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentRight="true"
                    android:drawableRight="@mipmap/goods_detail_more"
                    android:drawablePadding="4dp"
                    android:gravity="center_vertical"
                    android:text="¥72"
                    android:textColor="@color/main_color"
                    android:textSize="14sp" />
            </RelativeLayout>

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="@color/text_ee" />

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:padding="16dp">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="配送"
                    android:textColor="@color/text_7f"
                    android:textSize="14sp" />

                <TextView
                    android:id="@+id/address"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentRight="true"
                    android:drawableRight="@mipmap/goods_detail_more"
                    android:drawablePadding="4dp"
                    android:text=""
                    android:textColor="@color/text_40"
                    android:textSize="14sp" />
            </RelativeLayout>

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="@color/text_ee" />

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:padding="16dp">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="运费"
                    android:textColor="@color/text_7f"
                    android:textSize="14sp" />

                <TextView
                    android:id="@+id/fare"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentRight="true"
                    android:text="16"
                    android:textColor="@color/main_color"
                    android:textSize="14sp" />
            </RelativeLayout>

            <View
                android:layout_width="match_parent"
                android:layout_height="8dp"
                android:background="@color/text_ee" />

            <android.support.v7.widget.LinearLayoutCompat
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_marginTop="8dp"
                android:layout_marginBottom="8dp"
                android:gravity="center_vertical"
                android:orientation="horizontal">

                <View
                    android:layout_width="64dp"
                    android:layout_height="1dp"
                    android:background="@color/text_bf" />

                <android.support.v7.widget.AppCompatTextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="8dp"
                    android:layout_marginRight="8dp"
                    android:text="图文详情"
                    android:textSize="14sp"
                    android:textColor="@color/text_40"/>

                <View
                    android:layout_width="64dp"
                    android:layout_height="1dp"
                    android:background="@color/text_bf" />
            </android.support.v7.widget.LinearLayoutCompat>
            <TextView
                android:id="@+id/desc"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:paddingLeft="16dp"
                android:paddingRight="16dp"
                android:paddingBottom="16dp"
                android:text="16"
                android:textColor="@color/text_7f"
                android:textSize="14sp" />
            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="@color/text_ee" />

        </LinearLayout>

        <!--   </android.support.design.widget.CollapsingToolbarLayout>

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.