【问题标题】:no resource identifier found for 'ptrMode' in package在包中找不到“ptrMode”的资源标识符
【发布时间】:2014-04-08 09:53:00
【问题描述】:

我需要帮助摆脱这个错误,我想知道你们中是否有人在使用 pulltorefresh 时遇到过这个问题。我已经为 viewpager 和 listfragment 导入了 lib,但仍然没有出现资源标识符错误。

  <com.handmark.pulltorefresh.library.PullToRefreshListView
        xmlns:ptr="http://schemas.android.com/apk/res-auto"
        android:id="@+id/ptrlvAddFollowingResult"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_alignParentBottom="true"
        android:layout_below="@id/actvAddFollowingSearch"
        android:layout_centerHorizontal="true"
        android:cacheColorHint="#00000000"
        android:divider="#19000000"
        android:dividerHeight="4dp"
        android:fadingEdge="none"
        android:fastScrollEnabled="true"
        android:footerDividersEnabled="false"
        android:headerDividersEnabled="false"
        android:smoothScrollbar="true"
        ptr:ptrMode="pullFromEnd" 
   />

【问题讨论】:

  • 为什么不用官方的 pulltorefresh (SwipeRefreshLayout)?
  • 我现在正在尝试使用它,在这种情况下,我正在修改其他人的项目。感谢您的输入:)

标签: android


【解决方案1】:

您需要在自己项目的 attrs.xml 中的 ViewPagerIndicator 库的 attrs.xml 中包含可声明样式的“PullToRefresh”。 就我而言,这就解决了问题。

【讨论】:

    【解决方案2】:

    如果您将此库与资源一起使用,您是否在project.properties 中添加了以下行?

     android.library.reference.1=path/pull-to-refresh
    

    如果您已经拥有android.library.reference.1,则需要使用android.library.reference.n,其中 .n index in the references must begin at "1" and increase uniformly without "holes"(来自here)。

    【讨论】:

      猜你喜欢
      • 2015-05-03
      • 2015-12-26
      • 2017-12-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-05
      • 2011-07-12
      • 1970-01-01
      相关资源
      最近更新 更多