hikedien / android-quick-response-code

Automatically exported from code.google.com/p/android-quick-response-code
Apache License 2.0
0 stars 0 forks source link

I have get JSON response of string and that is display into spinner #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This is my response 
08-27 09:13:25.927: E/JSON(4376): 
{"subscriber_name":["MaheshKhatmode","Pranav","RameshSippy"]}

String res = getIntent().getStringExtra("Response");
        Log.d("Wallet_Management Response", "getIntent"  +res);
        //Subscriber_Name.setText(res);
        System.out.println("subscriber name response : " + res.toString());

         String[] strings = res.split("\\[ ");

         ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,
                    android.R.layout.simple_spinner_item, strings);
                    dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
                    dataAdapter.notifyDataSetChanged();
                    spinnerEmp.setAdapter(dataAdapter);

Original issue reported on code.google.com by dilip.bi...@gmail.com on 27 Aug 2014 at 1:19