Having the custom view TestView
and declaring the following custom attribute:
<declare-styleable name="TestView">
<attr name="testAttr" format="reference"/>
</declare-styleable>
upon trying to open the resource selection dialog from the attribute overview in the visual editor of Android Studio, the dialog opens and only allows for string resources to be selected. How can the above be modified to show the same dialog that appears when selecting the background resource for a view?
Thanks in advance for your help! =)
EDIT------
I tried modifying the code to be:
<declare-styleable name="TestView">
<attr name="testAttr" format="reference|color" />
</declare-styleable>
as this is what I found android:background
to be, but the dialog to only select color resources opens instead.