Back to project page Photochat.
The source code is released under:
This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a co...
If you think the Android project Photochat 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.navneet.photochat; //www . jav a2 s . com import java.util.Timer; import java.util.TimerTask; import android.app.Activity; import android.net.Uri; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.widget.ImageView; import com.squareup.picasso.Picasso; public class ViewImagesActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_view_images); ImageView imageView = (ImageView) findViewById(R.id.imageView); // get the uri passed from the inbox activity Uri mUri = getIntent().getData(); // Use the picasso lib to display the image Picasso.with(this).load(mUri.toString()).into(imageView); // Set timer for viewing the images Timer timer = new Timer(); timer.schedule(new TimerTask() { @Override public void run() { // finish this activity and go back to inboxFragment finish(); } }, 10 * 1000); } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } }