Here are the examples of the java api class com.google.android.apps.picview.request.CachedImageFetcher taken from open source projects.
1. PhotoListActivity#onCreate()
Project: picview-for-android
File: PhotoListActivity.java
File: PhotoListActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); int viewId = getIntent().getIntExtra("layout", -1); setContentView(viewId); mainList = (ListView) findViewById(R.id.photolist); inflater = LayoutInflater.from(this); albumName = getIntent().getExtras().getString("albumName"); photos = getIntent().getExtras().getParcelableArrayList("photos"); cachedImageFetcher = new CachedImageFetcher(new FileSystemImageCache()); initCurrentConfiguration(); loadPhotos(); }
2. AlbumListActivity#onCreate()
Project: picview-for-android
File: AlbumListActivity.java
File: AlbumListActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.album_list); mainList = (ListView) findViewById(R.id.albumlist); inflater = LayoutInflater.from(this); cachedImageFetcher = new CachedImageFetcher(new FileSystemImageCache()); cachedWebRequestFetcher = new CachedWebRequestFetcher(new FileSystemWebResponseCache()); initCurrentConfiguration(); // TODO: This is picasa specific. final String accountId = getIntent().getExtras().getString("accountId"); if (accountId != null) { doAlbumsRequest(accountId); } else { showAlbums(); } }
3. PhotoViewActivity#onCreate()
Project: picview-for-android
File: PhotoViewActivity.java
File: PhotoViewActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.photo_view); photoView = (ImageView) findViewById(R.id.photo); txtPhotoTitle = (TextView) findViewById(R.id.photo_title); txtAlbumName = (TextView) findViewById(R.id.photo_album_name); photoTouchAreaLeft = findViewById(R.id.photo_touch_left); photoTouchAreaRight = findViewById(R.id.photo_touch_right); photoTouchAreaLeft.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { showPreviousPhoto(); } }); photoTouchAreaRight.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { showNextPhoto(); } }); cachedImageFetcher = new CachedImageFetcher(new FileSystemImageCache()); initCurrentConfiguration(); showPhoto(); }
4. PhotoListActivity#initCurrentConfiguration()
Project: picview-for-android
File: PhotoListActivity.java
File: PhotoListActivity.java
private void initCurrentConfiguration() { CachedImageFetcher savedImageFecther = (CachedImageFetcher) getLastNonConfigurationInstance(); if (savedImageFecther != null) { cachedImageFetcher = savedImageFecther; } }