Android Open Source - PhotoGallery Photo Gallery Activity






From Project

Back to project page PhotoGallery.

License

The source code is released under:

MIT License

If you think the Android project PhotoGallery 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.ambergleam.photogallery;
// w ww.ja  va 2s.  c  o  m
import android.app.SearchManager;
import android.content.Intent;
import android.preference.PreferenceManager;
import android.support.v4.app.Fragment;
import android.util.Log;

public class PhotoGalleryActivity extends SingleFragmentActivity {

  private static final String TAG = "PhotoGalleryActivity";

  @Override
  protected Fragment createFragment() {
    return new PhotoGalleryFragment();
  }

  @Override
  protected void onNewIntent(Intent intent) {
    PhotoGalleryFragment fragment = (PhotoGalleryFragment) getSupportFragmentManager().findFragmentById(R.id.fragmentContainer);

    if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
      String query = intent.getStringExtra(SearchManager.QUERY);
      Log.i(TAG, "Received a new search query: " + query);

      PreferenceManager.getDefaultSharedPreferences(this).edit().putString(FlickrFetchr.PREF_SEARCH_QUERY, query).commit();
    }

    fragment.updateItems();
  }

}




Java Source Code List

com.ambergleam.photogallery.FlickrFetchr.java
com.ambergleam.photogallery.GalleryItem.java
com.ambergleam.photogallery.PhotoGalleryActivity.java
com.ambergleam.photogallery.PhotoGalleryFragment.java
com.ambergleam.photogallery.PollService.java
com.ambergleam.photogallery.SingleFragmentActivity.java
com.ambergleam.photogallery.ThumbnailDownloader.java