请教一个pulltorefresh的问题

fuckyouuass 2015-05-25 05:23:00
在一个fragment中的onCreateView中加载布局文件 报错:Binary XML file line #9: Error inflating class com.handmark.pulltorefresh.library.PullToRefreshListView

java文件:
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState)
{

View wrapper = inflater.inflate(R.layout.home_question_ui, container,false);
mPullRefreshListView = (PullToRefreshListView) wrapper
.findViewById(R.id.lv_item);
mPullRefreshListView.setMode(Mode.BOTH);
mPullRefreshListView.setScrollingWhileRefreshingEnabled(true);


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:gravity="center"
android:orientation="vertical" >

<com.handmark.pulltorefresh.library.PullToRefreshListView
android:id="@+id/lv_item"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@android:color/darker_gray"
android:dividerHeight="@dimen/y3"
android:fadingEdge="none" />

</LinearLayout>

大神帮帮忙看看呗,愁了一个下午了。。。
...全文
872 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
我姓朢 2016-06-22
  • 打赏
  • 举报
回复
怎么导入啊!!!!!
huya-wanghg 2016-05-31
  • 打赏
  • 举报
回复
正解是的 这个是android stdio的不好之处
zeroones- 2015-09-04
  • 打赏
  • 举报
回复
必须导入library,不仅仅导入,还要copy 到 workspace中去,下载了放在桌面没有copy进workspace没有办法使用了,亲身经历,希望后来人有所答案。
Cat_not_a_cat 2015-05-25
  • 打赏
  • 举报
回复
好吧解决了,没想到导入他的jar包还不行,还得把pulltorefresh这个工程作为了library导入。。。 太坑爹了,一个下午就这么没了。。。
Cat_not_a_cat 2015-05-25
  • 打赏
  • 举报
回复
引用 1 楼 heaimnmn 的回复:
没有找到com.handmark.pulltorefresh.library.PullToRefreshListView
我知道,但是怎么解决呢。。
Cat_not_a_cat 2015-05-25
  • 打赏
  • 举报
回复
我知道,但是怎么解决呢?
哎,真难 2015-05-25
  • 打赏
  • 举报
回复
没有找到com.handmark.pulltorefresh.library.PullToRefreshListView

80,360

社区成员

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

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