xmlns:ihtvpn="http://schemas.android.com/apk/res/com.ht.ui.widget"
改成
xmlns:ihtvpn="http://schemas.android.com/com.ht.ui.widget"试试?

解决方案 »

  1.   

    如果定义时候这样定义如下:
    <?xml version="1.0" encoding="utf-8"?>
    <resources>
         <attr name="shelfLayerCenter" format="reference" />
    </resources>
    使用如下:
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
           xmlns:tools="http://schemas.android.com/tools"
           xmlns:attr="http://schemas.android.com/apk/res-auto"
           android:layout_width="match_parent"
           android:layout_height="match_parent"
           android:background="@color/white"
           tools:context=".MainActivity" >       <com.soso.xs.ui.view.View_BookShelfList
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              attr:shelfLayerCenter="@drawable/bookshelf_layer_center" /></RelativeLayout>请大神指导如何在自定义的view中取值,万分感谢谢!
    联系邮箱[email protected]
      

  2.   

    看了下,我得出了这样的解决方法
    我新建项目的时候加入命名的包为
    com.sime.main
    然后我新建了一个包用于存放自定的view
    com.sime.custom
    按照网上大多数人说的我引用的自定义空间
     xmlns:cus="http://schemas.android.com/apk/res/com.sime.custom"
    接着我在xml 使用我的自定义属性cus:  然后ctrl加/ xml上自动多了一个命名空间
     xmlns:app="http://schemas.android.com/apk/res/com.sime.main"
    cus:并没有提示我定义好的属性,最后我用了app:标签出来了
    建议自定义view 包的命名最好在 com.sime.main.xxx 这样的包下面