String input = yourInputStringAbove;
// remove square brackets
input = input.substring(1, input.length() - 1);
// split each item by quotes and commas
String[] subset = input.split("\",\"");
// create output string (for single TextView, delete if using ListView)
String output = "";
for (String string : subset) {
// strip quotation marks
string = string.replace("\"", "");
// add the string to the output
output += string + "\n"; // (for single TextView, delete if using ListView)
}
// For a TextView
TextView textView = (TextView) findViewById(R.id.your_text_view);
textView.setText(output);
// For a ListView
ArrayAdapter<String> adapter = new ArrayAdapter<String>(getContext(), R.layout.your_text_view_layout, subset);
ListView listView = (ListView) findViewById(R.id.your_list_view);
listView.setAdapter(adapter);
那你試試? – Divers
發佈您的代碼。 –