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; //from w w w.j av a 2s. 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 VideoLezioni extends ListActivity { String[] lista={"Lezione 1 - Integrali Multipli", //0 "Lezione 2", //1 "Lezione 3", //2 "Lezione 4", //3 "Lezione 5", //4 "Lezione 6", //5 "Lezione 7", //6 "Lezione 8 - Integrali Curvilinei", //7 "Lezione 9", //8 "Lezione 10", //9 "Lezione 11", //10 "Lezione 12" //11 }; String[] sublist={"5 e 8 Marzo - Appunti pag 1-11", "12 Marzo - da pag 11...", "15 Marzo - ...fino a pag 18", "19 Marzo - da pag 19...", "22 Marzo - ...fino a pag 33", "26 Marzo - appunti 34-41 + esercizi", "29 Marzo - fine integrali multipli", "2 Aprile - Appunti da pag 1..", "12 Aprile - ...fino a pag 19", "16 Aprile - da pag 20...", "19 Aprile - ...fino a pag 32", "23 Aprile - appunti 33-36 + esercizi"}; @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 0: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.youtube.com/watch?feature=player_embedded&v=HcphjAEbFVw")); startActivity(intent); }break; case 1: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.youtube.com/watch?feature=player_embedded&v=ZtDGGTU0uFY")); startActivity(intent); }break; case 2: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.youtube.com/watch?feature=player_embedded&v=knEu0Ep3ZLA")); startActivity(intent); }break; case 3: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.youtube.com/watch?v=cZ-NI2hM3_k&feature=player_embedded")); startActivity(intent); }break; case 4: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.youtube.com/watch?feature=player_embedded&v=Zyi4-SAtrfg")); startActivity(intent); }break; case 5: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.youtube.com/watch?feature=player_embedded&v=ils6HQT9cYw")); startActivity(intent); }break; case 6: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.youtube.com/watch?v=W5HMNidVVrI&feature=player_embedded")); startActivity(intent); }break; case 7: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.youtube.com/watch?feature=player_embedded&v=mOxDw8urekE")); startActivity(intent); }break; case 8: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.youtube.com/watch?feature=player_embedded&v=lJX0T6vV0Xg")); startActivity(intent); }break; case 9: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.youtube.com/watch?feature=player_embedded&v=Q-BHtEP0gag")); startActivity(intent); }break; case 10: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.youtube.com/watch?v=NYCmXrzIiGU&feature=player_embedded")); startActivity(intent); }break; case 11: { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.youtube.com/watch?feature=player_embedded&v=pXJ7mIQMeH0")); 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 }