Bootstrap Dropdown doesn't work programmatically

Author: interwapCreated Apr 20, 2018Updated Apr 20, 2018

I'm trying to attach a dropdown to an activity programmatically but it just doesnt work. The bootstrap edit text works fine but the dropdown crashes everytime. I have even had to switch versions just to try and get it to work but it doesnt.

BootstrapDropDown bootstrapDropDown = new BootstrapDropDown( this.context ); bootstrapDropDown.setDropdownData( values ); parent.addView( bootstrapDropDown );

where values is a string array. I get hit with this error android.content.res.Resources$NotFoundException: String array resource ID #0xffffffff.

I even add a string array to my strings.xml values event that didnt work using resources. Anyone had luck with this?

<string-array name="bootstap_dropdown_example_data">
        <item>Physical Injuries</item>
        <item>Pollution</item>
    </string-array>

Source: Bearded-Hen/Android-Bootstrap