Closed CymChad closed 7 years ago
在android studio中使用适配器时,extends不了basequickAdapter,而其他两个都有。
有错误截图吗?
有的。我顺便把配置的截图也发给你吧,麻烦你帮我看下这是什么情况,第一次用,而且让公司的同事也帮忙看下,在他们电脑就没问题,在我这边就这样了,他们也不知道什么情况 先说声谢谢
这是extends时候AS的提示,像这样:
下面是我配置build.gradle的截图:
还有这个是我导入后的库,里面是有basequickadapter的,但是extends的时候就是没有。
lihuanbin@nme.cn
发件人: 陈宇明 发送时间: 2016-11-17 08:29 收件人: CymChad/BaseRecyclerViewAdapterHelper 抄送: lhbd; Comment 主题: Re: [CymChad/BaseRecyclerViewAdapterHelper] 提问须知! (#499) 有错误截图吗? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
你好,刚那个问题我找到了一个解决的方法了。 刚最后发现是我的Android studio本身的自动补全没有这个的提示,自己手动输入了import com.chad.library.adapter.base.BaseQuickAdapter; 然后就可以正常使用了。 至于为什么自动补全找不到这个我就不清楚,让大牛们操心去吧 再次表示下感激
lihuanbin@nme.cn
发件人: 陈宇明 发送时间: 2016-11-17 08:29 收件人: CymChad/BaseRecyclerViewAdapterHelper 抄送: lhbd; Comment 主题: Re: [CymChad/BaseRecyclerViewAdapterHelper] 提问须知! (#499) 有错误截图吗? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
当调用mAdapter.loadMoreComplete();方法时报错:
Cannot call this method while RecyclerView is computing a layout or scrolling
历史问题里面就有你的答案@caoeryang #344
Build version: 1.0.1 Build date: 1979-11-30 00:00:00 Current date: 2016-11-29 21:53:12 Device: Xiaomi Redmi Note 3
Stack trace:
java.lang.IllegalArgumentException: Scrapped or attached views may not be recycled. isScrap:false isAttached:true
at android.support.v7.widget.RecyclerView$Recycler.recycleViewHolderInternal(RecyclerView.java:4878)
at android.support.v7.widget.RecyclerView$Recycler.recycleView(RecyclerView.java:4828)
at com.chichio.xsds.view.MyLayoutManager.measureChild(MyLayoutManager.java:203)
at com.chichio.xsds.view.MyLayoutManager.onMeasure(MyLayoutManager.java:80)
at android.support.v7.widget.RecyclerView.onMeasure(RecyclerView.java:2614)
at android.view.View.measure(View.java:17782)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:846)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:512)
at android.view.View.measure(View.java:17782)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5625)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1692)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:760)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)
at android.view.View.measure(View.java:17782)
at android.widget.ScrollView.measureChildWithMargins(ScrollView.java:1277)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:459)
at android.widget.ScrollView.onMeasure(ScrollView.java:342)
at android.view.View.measure(View.java:17782)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5625)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:459)
at android.view.View.measure(View.java:17782)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:846)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:512)
at android.view.View.measure(View.java:17782)
at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1624)
at android.view.View.measure(View.java:17782)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:963)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)
at android.view.View.measure(View.java:17782)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5625)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:459)
at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135)
at android.view.View.measure(View.java:17782)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5625)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1692)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:760)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)
at android.view.View.measure(View.java:17782)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5625)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:459)
at android.view.View.measure(View.java:17782)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5625)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1692)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:760)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)
at android.view.View.measure(View.java:17782)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5625)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:459)
at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2644)
at android.view.View.measure(View.java:17782)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2396)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1406)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1630)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1284)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6490)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:802)
at android.view.Choreographer.doCallbacks(Choreographer.java:605)
at android.view.Choreographer.doFrame(Choreographer.java:574)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:788)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5546)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:967)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
加载更多功能: loadMoreFail() 展示点击刷新ui 点击"加载失败,请点我重试"后,"正在加载"与"加载失败,请点我重试"产生重叠,没有切换效果
@masterHY 用的自定义的加载更多?重叠是指”加载失败,请点我重试“和”正在加载“一起显示?
比如 把demo中的PullToRefreshUseActivity的 delayMillis 置为 0 isErr 始终置为 false 再运行之后,点击"加载失败,请点我重试"后,"正在加载"与"加载失败,请点我重试"会产生重叠
@masterHY 自带动画导致的,你可以取消自带动画mRecyclerView.setItemAnimator(null);
哦哦 懂了 多谢多谢
------------------ 原始邮件 ------------------ 发件人: "BlingBling";notifications@github.com; 发送时间: 2017年1月20日(星期五) 中午11:30 收件人: "CymChad/BaseRecyclerViewAdapterHelper"BaseRecyclerViewAdapterHelper@noreply.github.com; 抄送: "张浩宇"912434447@qq.com; "Mention"mention@noreply.github.com; 主题: Re: [CymChad/BaseRecyclerViewAdapterHelper] 提问须知! (#499)
@masterHY 自带动画导致的,你可以取消自带动画mRecyclerView.setItemAnimator(null);
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
if (mCurrentCounter >= TOTAL_COUNTER) { // pullToRefreshAdapter.loadMoreEnd();//default visible pullToRefreshAdapter.loadMoreEnd(mLoadMoreEndGone);//true is gone,false is visible }
貌似显示没有更多数据时,上拉监听就禁用了,看了好长时间源码没有找到办法,需求是这样的,当数据不满一页时,不显示底部显示,上拉的时候,显示正在加载,如果加载到最后一页显示 没有更多数据,然后再上拉如果没有最新数据 显示 正在加载 然后显示没有更多数据 求大神指教
@yuantanglong 有问题可以提issues
@AngelBo 能帮忙解释一下,为什么build date是1979年么? Build version: 1.0.1 Build date: 1979-11-30 00:00:00 Current date: 2016-11-29 21:53:12
override fun onViewDetachedFromWindow(holder: BaseDataBindingHolder<ItemHomeFollowInfoBinding>) {
super.onViewDetachedFromWindow(holder)
}
使用这段代码的时候 报错
6.如果不是最新版本请更新至最新版,查看版本信息
如果以上都尝试过了请提一个新的issues
参考提問的智慧