Back to project page Android-Sample-App.
The source code is released under:
End-User License Agreement for Sharethrough Software Product This End-User License Agreement (?EULA??) is a legal agreement between you (either an individual or a single entity) (?the End User?...
If you think the Android project Android-Sample-App 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.sharethrough.sample; // w w w. j ava 2s . c o m import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ListView; public class MyActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() { @Override public void uncaughtException(Thread thread, Throwable ex) { Log.wtf("MEMORY", "uncaught", ex); } }); setContentView(R.layout.activity_my); ListView menu = (ListView) findViewById(R.id.menu); menu.setAdapter(new ArrayAdapter<>(this, R.layout.menu_item, R.id.text, new String[]{ "Basic", "News Feed w/ Basic View", "Card Style w/ Basic View", "News Feed w/ ListAdapter", "DFP" })); menu.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) { switch (position) { case 0: startActivity(new Intent(MyActivity.this, BasicActivity.class)); break; case 1: startActivity(new Intent(MyActivity.this, ListAdapterWithBasicViewActivity.Feed.class)); break; case 2: startActivity(new Intent(MyActivity.this, ListAdapterWithBasicViewActivity.Card.class)); break; case 3: startActivity(new Intent(MyActivity.this, SharethroughListAdapterActivity.class)); break; case 4: startActivity(new Intent(MyActivity.this, DfpActivity.class)); break; } } }); } }