package com.metaio.cloud.plugin.view;

import android.app.Activity;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.view.ViewGroup.LayoutParams;
import android.widget.TextView;
import com.metaio.cloud.plugin.MetaioCloudPlugin;

public class ImageViewActivity extends Activity
  implements View.OnTouchListener
{
  public void onConfigurationChanged(Configuration paramConfiguration)
  {
    super.onConfigurationChanged(paramConfiguration);
  }

  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
  }

  protected void onResume()
  {
    super.onResume();
    String str = getIntent().getStringExtra(getPackageName() + ".URL");
    int i = getIntent().getIntExtra(getPackageName() + ".RESOURCEID", -1);
    TextView localTextView = new TextView(this);
    localTextView.setText("Loading...");
    localTextView.setGravity(17);
    setContentView(localTextView, new ViewGroup.LayoutParams(-1, -1));
    RemoteImageView localRemoteImageView = new RemoteImageView(this);
    addContentView(localRemoteImageView, new ViewGroup.LayoutParams(-1, -1));
    localRemoteImageView.setOnTouchListener(this);
    if (str != null)
    {
      MetaioCloudPlugin.log("Loading image: " + str);
      localRemoteImageView.setRemoteSource(str);
      return;
    }
    if (i > 0)
    {
      setRequestedOrientation(0);
      localRemoteImageView.setImageResource(i);
      return;
    }
    MetaioCloudPlugin.log("ImageViewActivity started without setting a valid URL or resourceID");
    finish();
  }

  public boolean onTouch(View paramView, MotionEvent paramMotionEvent)
  {
    finish();
    return true;
  }
}

/* Location:           C:\Documents and Settings\Cesar Cabello Cea\Mis documentos\Downloads\apk-downloader\com.ikea.kompis-6_dex2jar.jar
 * Qualified Name:     com.metaio.cloud.plugin.view.ImageViewActivity
 * JD-Core Version:    0.6.2
 */