Reputation: 30276
I have added some attributes into file attr.xml
. Here its code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="gallery_view">
<attr name="android:galleryItemBackground"/>
</declare-styleable>
<declare-styleable name="Dot">
<attr name="color" format="color"/>
<attr name="radius" format="dimension"/>
</declare-styleable>
</resources>
But I don't why when I use:
R.styleable.gallery_view_android_galleryItemBackground
: no error.
R.styleable.Dot_color
will notice error because cannot see this field in R file.
Please help me about this.
Thanks :)
Upvotes: 1
Views: 754
Reputation: 642
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.Dot);
a.getColor....
Upvotes: 0