Back to project page AndroidAPP-TorEngine.
The source code is released under:
GNU General Public License
If you think the Android project AndroidAPP-TorEngine 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 ironwolf.torengine; //www .j ava 2 s .c om import android.app.Activity; import android.app.ListActivity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ListView; import android.widget.TextView; public class Slide extends ListActivity { String[] lista={"PRIMO MODULO", //0 "Organizzazione Corso", //1 "Introduzione", //2 "Codifica dell'Informazione", //3 "Introduzione al C++", //4 "Strutture di Controllo", //5 "Funzioni", //6 "Array", //7 "", //8 "SECONDO MODULO (2011)", //9 "Introduzione", //10 "Debugging", //11 "Puntatori", //12 "Ricorsione", //13 "Strutture Dinamiche", //14 "Ereditarieta'"}; //15 String[] sublist={"", "Info generali", "Cos'? l'Informatica?", "Rappresentare informazioni", "Concetti base del c++", "If, While, For", "Concetto di funzione e visibilit?", "Struttura Statica e Omogenea", "", "", "Info Generali", "Testare un programma", "A cosa servono?", "Un nuovo metodo di programmare", "Come fare programmi Dinamici", "Collegare 2 classi diverse"}; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setListAdapter(new MyAdapter(this)); } @Override protected void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); switch(position) { case 1: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.ce.uniroma2.it/~lopresti/Didattica/Fondamenti/Fond1112/Organizz_Corso.pdf")); startActivity(intent); }break; case 2: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.ce.uniroma2.it/~lopresti/Didattica/Fondamenti/Fond1112/Intro.pdf")); startActivity(intent); }break; case 3: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.ce.uniroma2.it/~lopresti/Didattica/Fondamenti/Fond1112/Codifica.pdf")); startActivity(intent); }break; case 4: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.ce.uniroma2.it/~lopresti/Didattica/Fondamenti/Fond1112/IntroC.pdf")); startActivity(intent); }break; case 5: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.ce.uniroma2.it/~lopresti/Didattica/Fondamenti/Fond1112/Strutture%20di%20Controllo.pdf")); startActivity(intent); }break; case 6: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.ce.uniroma2.it/~lopresti/Didattica/Fondamenti/Fond1112/Funzioni.pdf")); startActivity(intent); }break; case 7: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.ce.uniroma2.it/~lopresti/Didattica/Fondamenti/Fond1112/Array.pdf")); startActivity(intent); }break; case 10: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.torengine.it/openftp/informatica-cpp/L01-FoI2%20Introduz.pdf")); startActivity(intent); }break; case 11: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.torengine.it/openftp/informatica-cpp/L02-FoI2%20Debugging.pdf")); startActivity(intent); }break; case 12: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.torengine.it/openftp/informatica-cpp/L03-FoI2%20Puntatori.pdf")); startActivity(intent); }break; case 13: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.torengine.it/openftp/informatica-cpp/L04-FoI2%20Ricorsione.pdf")); startActivity(intent); }break; case 14: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.torengine.it/openftp/informatica-cpp/L05-FoI2%20Strutt%20Dinamiche.pdf")); startActivity(intent); }break; case 15: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.torengine.it/openftp/informatica-cpp/L06-FoI2%20Ereditariet%c3%a0.pdf")); startActivity(intent); }break; } } class MyAdapter extends BaseAdapter { private LayoutInflater inflater=null; MyAdapter(Activity a) { inflater = LayoutInflater.from(a); } public int getCount() { return lista.length; } public Object getItem(int position) { return lista[position]; } public long getItemId(int position) { return 0; } public class ViewHolder { public TextView titolo; public TextView subtit; } public View getView(int position, View convertView, ViewGroup parent) { View vi=convertView; ViewHolder holder; vi=inflater.inflate(R.layout.list_item,null); holder=new ViewHolder(); holder.titolo=(TextView) vi.findViewById(R.id.textViewList); holder.subtit=(TextView) vi.findViewById(R.id.textViewSubList); holder.titolo.setText(lista[position]); holder.subtit.setText(sublist[position]); return vi; } }//fine adapter }