Back to project page test-gradle.
The source code is released under:
Copyright (c) <2013> <Paul Estrada> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the S...
If you think the Android project test-gradle listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.listexample; //from w ww .j ava 2 s.c o m import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.widget.ListView; import com.example.listexample.utils.HttpUtils; public class MultiListActivity extends Activity { private ListView myList = null; private MyAdapter myAdapter = null; public enum RowType { ROW1, ROW2, ROW3 } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_multi); Log.e("TAG", "a: " + HttpUtils.connect("http://www.google.com", null)); myList = (ListView) findViewById(R.id.list_view_lista); myAdapter = new MyAdapter(this); myList.setAdapter(myAdapter); //adding elements int j = 1; for (int i = 0; i <= 15; i++) { j++; switch (j) { case 1: myAdapter.addElement("Juan: " + i, RowType.ROW1); break; case 2: myAdapter.addElement("Juan: " + i, RowType.ROW2); break; case 3: myAdapter.addElement("Juan: " + i, RowType.ROW3); break; default: break; } if (i == 3) { j = 1; } } } }