Back to project page PhotoGallery.
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.
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(); } }