Android-Bootstrap icon indicating copy to clipboard operation
Android-Bootstrap copied to clipboard

How can set data to BootstrapDropDown programmatically?

Open DinukaGayan opened this issue 6 years ago • 1 comments

How can set data to BootstrapDropDown programmatically?

DinukaGayan avatar Jul 25 '17 09:07 DinukaGayan

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);

SaeedBahari avatar Jun 05 '18 08:06 SaeedBahari