I have created a custom widget, and I\'m declaring it in layout.xml. I have also added some custom attributes in attr.xml. However, when trying to declare these attributes
above answer is worked for me, I tried a litte change, I declare styleable for a class in resources element.
in declare-styleable, the name attribute referenced a class name, so I had a view class call "com.my.package.name.VerticalView", it represented this declare must be use in VerticalView or subclasses of VerticalView. so we can declare style like this :
that's why we didn't declare namespace at resources element, it still work.