Android Open Source - android_google_image_searcher Full Screen Activity






From Project

Back to project page android_google_image_searcher.

License

The source code is released under:

GNU General Public License

If you think the Android project android_google_image_searcher 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.github.snambi.googleimagesearcher;
//from w w  w .  ja  v a 2 s  .  co  m
import android.app.Activity;
import android.graphics.Point;
import android.os.Bundle;
import android.view.Display;
import android.view.Window;
import android.widget.ImageView;

import com.squareup.picasso.Picasso;

public class FullScreenActivity extends Activity {

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.activity_full_screen);
    
    Bundle data = getIntent().getExtras();
    Image image = (Image) data.getParcelable("IMAGE");
    
    // load the image and set as resource to the Image view
    
    ImageView imgView = (ImageView) findViewById(R.id.imgFullScreen);
    
    Display display = getWindowManager().getDefaultDisplay();
    Point size = new Point();
    display.getSize(size);
    
    
    Picasso.with( this)
        .load( image.getUrl() )
        .resize(size.x, size.y)
        //.fit()
        .centerCrop()
        .into(imgView);
  }
}




Java Source Code List

com.github.snambi.googleimagesearcher.AndroidUtils.java
com.github.snambi.googleimagesearcher.EndlessScrollListener.java
com.github.snambi.googleimagesearcher.FullScreenActivity.java
com.github.snambi.googleimagesearcher.GoogleImageAdapter.java
com.github.snambi.googleimagesearcher.GoogleImageClient.java
com.github.snambi.googleimagesearcher.ImageUtil.java
com.github.snambi.googleimagesearcher.Image.java
com.github.snambi.googleimagesearcher.SearchActivity.java
com.github.snambi.googleimagesearcher.SettingsActivity.java
com.github.snambi.googleimagesearcher.SettingsDialog.java
com.github.snambi.googleimagesearcher.SettingsFragmentActivity.java
com.github.snambi.googleimagesearcher.SquareImage.java