Open DinukaGayan opened 7 years ago
if You have Array inside String.xml You can use this: BTD.setDropdownData("@array/*****");
if you don't have, you want set data from Your Database, You must create a method with Object return.. why? because you need TWO argument first count of data ,second value of data.. you can use this snippet code:
DBHandler handler = new DBHandler(this); Object[] a = handler.QueryDropDown(); Count= (int) a[1]; Value= new String[Count]; Value= (String[]) a[0]; BTD.setDropdownData(Value);
How can set data to BootstrapDropDown programmatically?