How can I set up custom namespaces in layout file in Android studio?

前端 未结 1 1440
太阳男子
太阳男子 2020-12-15 08:01

I am using the dragsortlistview library for my project which requires the usage of a custom namespace in the XML file in order to customize it.

mylayout.xml:

相关标签:
1条回答
  • 2020-12-15 08:34

    res-auto uses the current package name, not the library package name. In your case, it translates to net.mypackage.

    If you want to use the namespace for a library, you need to use its package name. Judging from the class name, you are using the DSLV library from here. So, you'll want to use:

    xmlns:dslv="http://schemas.android.com/apk/res/com.mobeta.android.dslv" 
    
    0 讨论(0)
提交回复
热议问题