Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

how to set list data to android spinner

// setting branch data in manually and load to spBranchName
        List<String> branchList = new ArrayList<>();
        branchList.add("CHITTAGONG");
        branchList.add("DHAKA");

        ArrayAdapter<String> branchListAdapter = new ArrayAdapter<>(getActivity(),
                android.R.layout.simple_spinner_item, branchList);
        branchListAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        spBranchName.setAdapter(branchListAdapter);
Comment

PREVIOUS NEXT
Code Example
Java :: replace all punctuation in string java 
Java :: change height of row at JTable 
Java :: java factorial loop 
Java :: android vibrate device 
Java :: java reverse loop 
Java :: convert int to hex java 
Java :: how to remove spaces from an array in java 
Java :: java rock paper scissors 
Java :: java charsequence to string 
Java :: java array declaration 
Java :: how to reverse a string in java 
Java :: change javahome cmd 
Java :: java create arraylist 
Java :: java string padding 
Java :: java map not null 
Java :: android studio Clearing shared preferences; 
Java :: binding fragment android 
Java :: loop java 
Java :: randomize 2d array java 
Java :: how to create a stack data structure in java? 
Java :: add stringarrays to string list java 
Java :: java stream min 
Java :: javafx resizable window 
Java :: string to bigdecimal 
Java :: java home mac 
Java :: java text file to arraylist 
Java :: android list[i] 
Java :: caused by: java.lang.noclassdeffounderror: org/springframework/boot/configurationprocessor/json/jsonexception 
Java :: java install in fedora 
Java :: java spring boot json deserialize date inaccurate 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =