private static final String TAG = “MainActivity”;
private List<Person> persons;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mButton = (Button) findViewById(R.id.button1);
mListView = (ListView) findViewById(R.id.listView1);
mButton.setOnClickListener(new MyOnClickListener());
}
private class MyOnClickListener implements OnClickListener {
@SuppressLint(“ShowToast”)
@Override
public void onClick(View v) {
try {
// 得到Json解析成功之后数据
persons = JsonParse.getListPerson(urlPath);
List<HashMap<String, Object>> data = new ArrayList<HashMap<String, Object&
版权声明:本文为jicha8469原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。