package com.example.unodtantos.appqueology2.controlador;

import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.widget.ImageView;

import com.example.unodtantos.appqueology2.R;

import java.io.File;

/**
 * Created by unodtantos on 03/06/2015.
 */
public class ImagenUe extends Activity {

    /*--------------------------------------------------------------------------------------------*/

    // <editor-fold defaultstate="collapsed" desc="Constructor de la clase">

    /**
     * Constructor de la clase.
     * @param savedInstanceState
     */
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_foto_ampliada);

        String url = getIntent().getExtras().getString("url");
        ImageView img = (ImageView) findViewById(R.id.imageView);

        File imgFile = new File(String.valueOf(url));
        if(imgFile.exists()) {
            img.setImageURI(Uri.fromFile(imgFile));
        }

        img.setImageURI(Uri.parse(url));
    }

    // </editor-fold>

    /*--------------------------------------------------------------------------------------------*/
}
