Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
In this blog,
We have shown you how to make a custom attribute and how to reference color attribute in drawable.
You can define attributes in the top <resources> element or inside of an <declare-styleable>element.
<resources>
<declare-styleable>
Note: All attributes share the same global namespace. That means that even if you create a new attribute inside of an <declare-styleable> element it can be used outside of it and you cannot create another attribute with the same name of a different type.
An <attr> element has two XML attributes name and format. name lets you call it something and this is how you end up referring to it in code, e.g.,R.attr.my_c_attribute The format attribute can have different values depending on the ‘type‘ of the attribute you want.
<attr>
name
format
ame
R.attr.my_c_attribute
There are few simple steps,
Theme1
Theme2
Maybe this blog is helpable for you.
Source: https://github.com/android/
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Name
Email
Subject
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.