【问题标题】:Problem renaming cwac-touchlist package in Java在 Java 中重命名 cwac-touchlist 包的问题
【发布时间】:2011-08-26 07:49:38
【问题描述】:

我正在尝试将 cwac-touchlist 用作 Eclipse 中的项目库:

https://github.com/commonsguy/cwac-touchlist

一切似乎都运行良好,除非我正在创建我的 XML

<?xml version="1.0" encoding="utf-8"?>
<com.commonsware.cwac.tlv.TouchListView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tlv="http://schemas.android.com/apk/res/com.commonsware.cwac.tlv.demo"

    android:id="@android:id/list"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:drawSelectorOnTop="false"
    tlv:normal_height="64dip"
    tlv:grabber="@+id/icon"
    tlv:remove_mode="slideRight"
/>

我得到错误:

No resource identifier found for attribute 'grabber' in package 'com.commonsware.cwac.tlv.demo' 

说明书说:

You will need to change the com.commonsware.cwac.tlv.demo to your own project's package in the tlv namespace declaration.

但我不知道该将这个包重命名为什么?我的项目包名为org.sheehan.activity

【问题讨论】:

    标签: java android namespaces package cwac-touchlist


    【解决方案1】:

    然后改变:

    xmlns:tlv="http://schemas.android.com/apk/res/com.commonsware.cwac.tlv.demo"
    

    到:

    xmlns:tlv="http://schemas.android.com/apk/res/org.sheehan.activity"
    

    【讨论】:

    • 这很好用。感谢您对 SO 和邮件列表的大力支持。
    猜你喜欢
    • 1970-01-01
    • 2015-08-17
    • 2011-05-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-21
    • 2023-03-04
    • 2017-12-18
    相关资源
    最近更新 更多