Back to project page mobile-android.
The source code is released under:
MIT License
If you think the Android project mobile-android 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.manyconf.conference; // w w w . j ava 2s . com import android.app.Activity; import android.app.Application; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.os.AsyncTask; import android.os.Bundle; import android.util.Log; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ListAdapter; import android.widget.ListView; import android.widget.SimpleAdapter; import android.widget.Toast; import org.apache.http.NameValuePair; import org.apache.http.message.BasicNameValuePair; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; public class ScheduleActivity extends Activity implements AdapterView.OnItemClickListener { public static final String mod = "manyconf.sched"; private ConferenceModel conference; private int conferenceListID; ListView scheduleListView; @Override protected void onCreate(Bundle savedInstanceState) { Log.d(mod, "onCreate()"); super.onCreate(savedInstanceState); // Retrieve conference that we should display LinkedHashMap<Integer, ConferenceModel> conferenceList = ((ConferenceApplication)getApplication()).getConferenceList(); conferenceListID = this.getIntent().getExtras().getInt("conferenceListID"); conference = conferenceList.get(conferenceListID); setContentView(R.layout.activity_schedule); // Set up listener for taps scheduleListView = (ListView) findViewById(R.id.schedule_listview); scheduleListView.setOnItemClickListener(this); // Hook up data model with list view TrackModel trackModel = conference.tracks.get(0); ArrayAdapter arrayAdapter = new ThemedArrayAdapter(this, android.R.layout.simple_list_item_1, trackModel.presentations); scheduleListView.setAdapter(arrayAdapter); arrayAdapter.notifyDataSetChanged(); } @Override public void onItemClick(AdapterView parent, View view, int position, long id) { Log.d(mod, "clicked"); Intent intent = new Intent(this, PresentationActivity.class); intent.putExtra("conferenceListID", conferenceListID); intent.putExtra("presentationListIndex", position); startActivity(intent); } @Override public boolean onOptionsItemSelected(MenuItem item) { Log.d(mod, "onOptionsItemSelected()"); switch (item.getItemId()) { case android.R.id.home: // If user taps the Up button in the navbar, just finish() Log.d("manyconf.pres", "finish"); finish(); return true; } Log.d(mod, "call super"); return super.onOptionsItemSelected(item); } }