Skip to content

Commit

Permalink
ok example
Browse files Browse the repository at this point in the history
  • Loading branch information
kenmeidearu committed Nov 17, 2017
1 parent f2406e8 commit 2850ed0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sample/src/main/java/com/kenmeidearu/sample/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ protected void onCreate(Bundle savedInstanceState) {
final SearchableSpinner sp1 = (SearchableSpinner) findViewById(R.id.spinner1);
SearchableSpinner sp2 = (SearchableSpinner) findViewById(R.id.spinner2);

//for two data
ArrayList<mListString> StringIsi = new ArrayList<>();//must crete this to generate data there are n1-n4
customerNama = getResources().getStringArray(R.array.planets);
int id = 0;
Expand All @@ -34,7 +35,7 @@ protected void onCreate(Bundle savedInstanceState) {
sp.setTitleList("--Select Planet--");//use this to create initial search first
sp.setAdapter(StringIsi, 2, 1);// type spinner 1-4, search option 1-4

//select customer
//for 4 data
final ArrayList<mListString> listStringsCustomer = new ArrayList<>();
listStringsCustomer.add(new mListString(1, "Andi", "Ambon Street", "Active", "New"));
listStringsCustomer.add(new mListString(2, "Budi", "Bandung Street", "Active", "New"));
Expand All @@ -44,7 +45,7 @@ protected void onCreate(Bundle savedInstanceState) {
sp1.setTitleList("--Select Customer--");//use this to create initial search first
sp1.setAdapter(listStringsCustomer, 4, 4);// type spinner 1-4, search option 1-4


//for immage
final ArrayList<mListString> listStringsNegara = new ArrayList<>();
listStringsNegara.add(new mListString(1, "Indonesia", "INA", "https://id.wikipedia.org/wiki/Berkas:Flag_of_Indonesia.svg", true));
listStringsNegara.add(new mListString(1, "Amerika Serikat", "USA", "https://id.wikipedia.org/wiki/Berkas:Flag_of_the_United_States.svg", true));
Expand Down

0 comments on commit 2850ed0

Please sign in to comment.