Custom Array Type Attributes

Can someone please help me on how I can define a custom attribute like "string-array" because I cannot find Formats for defining an array.

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

This code does not work. What should be my "format"?

+5
source share
1 answer

Instead of using

    format="string-array"

I used

    format="reference"

and passed it to the string array resource.

+5
source

All Articles