Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom Attributes of array type

Can someone please help me on how can i define an custom attribute of type "string-array" because i cannot find Formats to define array.

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <declare-styleable name="MyCustomWidget">
        <attr name="myarray" format="string-array"/>
    </declare-styleable>
</resources>

This code doesn't seem to work. What should be my "format"?

like image 554
Flake Avatar asked Jun 16 '12 12:06

Flake


People also ask

What are custom attributes?

A custom attribute is a property that you can define to describe assets. Custom attributes extend the meaning of an asset beyond what you can define with the standard attributes. You can create a custom attribute and assign to it a value that is an integer, a range of integers, or a string.

What are custom attributes in HTML5?

Custom attributes are attributes that are not part of the standard HTML5 attributes but are explicitly created. They allow us to add our own information to HTML tags. These are not specific and can be used with all the HTML elements.

What are the custom attributes in net?

Attributes are key-value pairs containing information that determines the properties of an event or transaction.


1 Answers

Instead of using

    format="string-array"

I used

    format="reference"

and referred it to string-array resource.

like image 136
Flake Avatar answered Sep 19 '22 13:09

Flake