Back to project page gizmooi.
The source code is released under:
GNU General Public License
If you think the Android project gizmooi 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.timvdalen.gizmooi; /* ww w.j av a2 s . co m*/ import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.widget.Toast; /** * Shows a Toast then closes. * * I'd rather not actually start an Activity for this, it feels quite hacky, but there is no other way to handle click events from a widget at this point. * Maybe I'll change this to a detail view of the Photo with attribution info. */ public class ToastShowActivity extends Activity{ @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); // Get data from click Intent Intent intent = getIntent(); Photo photo = (Photo) intent.getSerializableExtra("photo"); // Show the attribution data String txtToast = photo.getTitle() + " / " + photo.getOwner() + " - " + photo.getLicense(); Toast.makeText(getBaseContext(), txtToast, Toast.LENGTH_SHORT).show(); finish(); } }