Android Open Source - Photochat View Images Activity






From Project

Back to project page Photochat.

License

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.

Java Source Code

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);
  }
}




Java Source Code List

com.navneet.photochat.EditFriendsActivity.java
com.navneet.photochat.FileHelper.java
com.navneet.photochat.FriendsFragment.java
com.navneet.photochat.ImageResizer.java
com.navneet.photochat.InboxFragment.java
com.navneet.photochat.LoginActivity.java
com.navneet.photochat.MD5Util.java
com.navneet.photochat.MainActivity.java
com.navneet.photochat.ParseConstants.java
com.navneet.photochat.PhotoChatApplication.java
com.navneet.photochat.RecipientsActivity.java
com.navneet.photochat.SectionsPagerAdapter.java
com.navneet.photochat.SignUpActivity.java
com.navneet.photochat.UserAdpater.java
com.navneet.photochat.ViewImagesActivity.java
com.navneet.photochat.messageAdapter.java