From 2850ed0a9b542aefbdef737ba14511eff393e0bb Mon Sep 17 00:00:00 2001 From: kenmeidearu Date: Fri, 17 Nov 2017 15:03:46 +0700 Subject: [PATCH] ok example --- .../src/main/java/com/kenmeidearu/sample/MainActivity.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sample/src/main/java/com/kenmeidearu/sample/MainActivity.java b/sample/src/main/java/com/kenmeidearu/sample/MainActivity.java index 0cf9ca1..632827d 100644 --- a/sample/src/main/java/com/kenmeidearu/sample/MainActivity.java +++ b/sample/src/main/java/com/kenmeidearu/sample/MainActivity.java @@ -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 StringIsi = new ArrayList<>();//must crete this to generate data there are n1-n4 customerNama = getResources().getStringArray(R.array.planets); int id = 0; @@ -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 listStringsCustomer = new ArrayList<>(); listStringsCustomer.add(new mListString(1, "Andi", "Ambon Street", "Active", "New")); listStringsCustomer.add(new mListString(2, "Budi", "Bandung Street", "Active", "New")); @@ -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 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));