Android Open Source - MyFlickrSearch Enums






From Project

Back to project page MyFlickrSearch.

License

The source code is released under:

MIT License

If you think the Android project MyFlickrSearch 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.devng.flickrsearch.common;
/*from   w ww.j  av a2  s. co m*/
/**
 * In this class we keep some enums relevant for the Flickr RESTful API.
 */
public class Enums {

  /**
   * No instances of this class
   */
  private Enums() {
  }

  /**
   * Enum for the different image size suffixes.
   * For example add '_m' at the end for Flickr image url to get a small image, for more details:
   *
   * http://www.flickr.com/services/api/misc.urls.html
   */
  public enum ImageSize {
    /**
     * small square 75x75
     */
    SMALL_SQUARE("_s"),
    /**
     * large square 150x150
     */
    LARGE_SQUARE("_q"),
    /**
     * small, 240 on longest side
     */
    SMALL("_m"),
    /**
     * medium 640, 640 on longest side
     */
    MEDIUM("_z");

    private String suffix;

    private ImageSize(String suffix) {
      this.suffix = suffix;
    }

    public String getSuffix() {
      return this.suffix;
    }

    @Override
    public String toString() {
      return this.suffix;
    }
  }

  /**
   * The sorting order in which to sort returned photos. For more details see:
   *
   * http://www.flickr.com/services/api/flickr.photos.search.html
   *
   * Note that the order here is relevant and must be the same as in R.array.sort_by_array
   */
  public enum SortOrder {
    RELEVANCE("relevance"),
    INTERESTINGNESS_DESC("interestingness-desc"),
    DATE_POSTED_DESC("date-posted-desc"),
    DATE_TAKEN_DESC("date-taken-desc");

    private String value;

    private SortOrder(String value) {
      this.value = value;
    }

    public String getValue() {
      return this.value;
    }

    @Override
    public String toString() {
      return this.value;
    }
  }
}




Java Source Code List

com.devng.flickrsearch.AbstractBackButtonActivity.java
com.devng.flickrsearch.ImageViewerActivity.java
com.devng.flickrsearch.MainActivity.java
com.devng.flickrsearch.MainModule.java
com.devng.flickrsearch.SearchResultsActivity.java
com.devng.flickrsearch.SearchResultsListAdapter.java
com.devng.flickrsearch.common.Config.java
com.devng.flickrsearch.common.Enums.java
com.devng.flickrsearch.common.Helpers.java
com.devng.flickrsearch.model.FlickrImgContainer.java
com.devng.flickrsearch.model.FlickrImgRef.java
com.devng.flickrsearch.model.FlickrImgRoot.java
com.devng.flickrsearch.task.DownloadFlickrImagesHandler.java
com.devng.flickrsearch.task.DownloadFlickrImagesTask.java
com.devng.flickrsearch.task.SearchFlickrResultHadler.java
com.devng.flickrsearch.task.SearchFlickrTask.java