Android Open Source - android_google_image_searcher Square Image






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 .j  av  a  2  s  .  c o  m*/
import android.content.Context;
import android.util.AttributeSet;
import android.widget.ImageView;

public class SquareImage extends ImageView {

  public SquareImage(Context context) {
    super(context);
  }
  
  public SquareImage(Context context, AttributeSet attrs) {
    super(context, attrs);
  }
    
  public SquareImage(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
  }

  @Override
  protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
  
    super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    
    int width = getMeasuredWidth();
    
    setMeasuredDimension(width, width);
  }

}




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