Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

就一个recyclerview就不能用,而且导致正在刷新的文字在中间显示。这什么鬼 #38

Open
lozn00 opened this issue Oct 15, 2021 · 7 comments

Comments

@lozn00
Copy link

lozn00 commented Oct 15, 2021

表示并不能用

@lozn00
Copy link
Author

lozn00 commented Oct 15, 2021

<?xml version="1.0" encoding="utf-8"?>

<FrameLayout
    tools:context=".act.JSONQueryTableActivity"
    android:layout_width="match_parent"
    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_height="match_parent">



    <LinearLayout

        android:background="@color/themeColorSecond"
        android:id="@+id/backdrop_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <LinearLayout

            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="@dimen/spacing_smlarge"
                android:layout_marginLeft="@dimen/spacing_smlarge"
                android:layout_marginRight="@dimen/spacing_smlarge"
                android:text="Filter result"
                android:id="@+id/tv_title"
                android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
                android:textColor="@android:color/white"
                />

            <View
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_weight="1" />
            <ImageView
                android:id="@+id/action_cancel"
                android:layout_width="?attr/actionBarSize"
                android:layout_height="?attr/actionBarSize"
                android:padding="@dimen/spacing_large"
                android:visibility="gone"
                android:src="@drawable/ic_close"
                app:tint="@android:color/white" />

            <ImageView
                android:id="@+id/action_menu"
                android:layout_width="?attr/actionBarSize"
                android:layout_height="?attr/actionBarSize"
                android:padding="@dimen/spacing_large"
                android:src="@drawable/ic_tune"
                app:tint="@android:color/white" />
        </LinearLayout>
        <androidx.core.widget.NestedScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
        <LinearLayout
            android:orientation="vertical"
            android:id="@+id/layout_form"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

        </LinearLayout>
        </androidx.core.widget.NestedScrollView>

    </LinearLayout>


        <androidx.cardview.widget.CardView
            android:id="@+id/root"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginTop="?attr/actionBarSize"
            android:visibility="visible"
            app:cardBackgroundColor="@android:color/white"
            app:cardCornerRadius="6dp"
            app:cardElevation="8dp">
            <com.scwang.smart.refresh.layout.SmartRefreshLayout

                android:id="@+id/refreshlayout"
                android:visibility="visible"
                android:layout_width="match_parent"
                android:layout_height="match_parent">
            <com.sotrun.app.ui.thrid.MySmartTable
                android:id="@+id/tableview"
                android:layout_width="match_parent"
                android:clipToPadding="false"
                android:scrollingCache="true"
                android:layout_height="match_parent"
                app:layout_behavior="@string/appbar_scrolling_view_behavior"
                app:layout_constraintBottom_toBottomOf="parent" />

                <com.scwang.smart.refresh.header.ClassicsHeader
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content" />



            </com.scwang.smart.refresh.layout.SmartRefreshLayout>

    </androidx.cardview.widget.CardView>


</FrameLayout>

第一,手势方向还是要从上往下拉才出来,但是永远不走效果只出来一个刷新图标。 横向刷新是从左右出来的。

@lozn00
Copy link
Author

lozn00 commented Oct 15, 2021

还有,你的demo为什么要强制竖屏。。。

@lozn00
Copy link
Author

lozn00 commented Oct 15, 2021

demo的商品详情就滑动不了右边,莫非还跟手机版本有关系么

@lozn00
Copy link
Author

lozn00 commented Oct 15, 2021

发错了这个是横屏界面

<?xml version="1.0" encoding="utf-8"?>

<androidx.coordinatorlayout.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">


    <com.google.android.material.appbar.AppBarLayout

        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/transparent">

        <com.google.android.material.appbar.CollapsingToolbarLayout
            android:id="@+id/collapsingToolbarLayout"

            android:layout_width="match_parent"

            android:layout_height="wrap_content"
            app:layout_collapseMode="pin"
            app:layout_scrollFlags="scroll|enterAlways">


                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="?attr/actionBarSize"
                    android:background="@color/themeColorSecond"
                    android:gravity="center_vertical"
                    android:orientation="horizontal">

                    <TextView
                        android:id="@+id/tv_title"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginHorizontal="@dimen/spacing_smlarge"
                        android:layout_marginLeft="@dimen/spacing_smlarge"
                        android:layout_marginRight="@dimen/spacing_smlarge"
                        android:text="Filter result"
                        android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
                        android:textColor="@android:color/white" />

                    <View
                        android:layout_width="0dp"
                        android:layout_height="0dp"
                        android:layout_weight="1" />

                    <ImageView
                        android:id="@+id/action_cancel"
                        android:layout_width="?attr/actionBarSize"
                        android:layout_height="?attr/actionBarSize"
                        android:padding="@dimen/spacing_large"
                        android:src="@drawable/ic_close"
                        android:visibility="gone"
                        app:tint="@android:color/white" />

                    <ImageView
                        android:id="@+id/action_menu"
                        android:layout_width="?attr/actionBarSize"
                        android:layout_height="?attr/actionBarSize"
                        android:padding="@dimen/spacing_large"
                        android:src="@drawable/ic_tune"
                        app:tint="@android:color/white" />


            </LinearLayout>
        </com.google.android.material.appbar.CollapsingToolbarLayout>


    </com.google.android.material.appbar.AppBarLayout>

    <androidx.cardview.widget.CardView
        android:id="@+id/root"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="visible"
        app:cardBackgroundColor="@android:color/white"
        app:cardCornerRadius="6dp"
        app:cardElevation="0dp">

        <com.scwang.smart.refresh.horizontal.SmartRefreshHorizontal

            android:id="@+id/refreshlayout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:visibility="visible">
            <com.scwang.smart.refresh.header.MaterialHeader
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
            <com.sotrun.app.ui.thrid.MySmartTable
                android:id="@+id/tableview"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:scrollingCache="true"
                app:layout_behavior="@string/appbar_scrolling_view_behavior"
                app:layout_constraintBottom_toBottomOf="parent" />

            <com.scwang.smart.refresh.header.ClassicsHeader
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

        </com.scwang.smart.refresh.horizontal.SmartRefreshHorizontal>


    </androidx.cardview.widget.CardView>


    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"
        android:layout_height="match_parent">

        <androidx.core.widget.NestedScrollView
            android:id="@+id/backdrop_view"
            android:layout_width="0dp"

            android:layout_height="wrap_content"
            android:background="@color/themeColorSecond"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent"


            app:layout_constraintWidth_percent="0.39">

            <LinearLayout
                android:id="@+id/layout_form"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:minHeight="150dp"
                android:orientation="vertical">

            </LinearLayout>

        </androidx.core.widget.NestedScrollView>

    </androidx.constraintlayout.widget.ConstraintLayout>


</androidx.coordinatorlayout.widget.CoordinatorLayout>

@Felix1030
Copy link

一样的问题,刷新的显示到布局中间了 不知道啥问题

@kapaseker
Copy link

@Felix1030 ,降低版本试试,使用2.0.0版本的横向滑动,而非2.0.1.

@Felix1030
Copy link

Felix1030 commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants