7

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"?

1 Answer 1

7

Instead of using

    format="string-array"

I used

    format="reference"

and referred it to string-array resource.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.