当前位置: 首页>>代码示例>>Java>>正文


Java PicViewConfig类代码示例

本文整理汇总了Java中com.google.android.apps.picview.PicViewConfig的典型用法代码示例。如果您正苦于以下问题:Java PicViewConfig类的具体用法?Java PicViewConfig怎么用?Java PicViewConfig使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PicViewConfig类属于com.google.android.apps.picview包,在下文中一共展示了PicViewConfig类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: MultiColumnImageAdapter

import com.google.android.apps.picview.PicViewConfig; //导入依赖的package包/类
/**
 * Instantiates a new MultiColumnImageAdapter.
 * 
 * @param dataItems
 *          the list of data items to display
 * @param inflater
 *          the inflater to be used to inflate the thumbnail slots
 * @param listener
 *          a listener that is notified when an album was clicked on
 * @param cachedImageFetcher
 *          used to fetch the thumbnail images
 * @param displayMetrics
 *          used to determine who many thumbnails can be display on a single
 *          row
 */
public MultiColumnImageAdapter(List<ThumbnailItem<T>> dataItems,
    LayoutInflater inflater, ThumbnailClickListener<T> listener,
    CachedImageFetcher cachedImageFetcher, DisplayMetrics displayMetrics) {
  this.dataItems = dataItems;
  this.inflater = inflater;
  this.listener = listener;
  this.cachedImageFetcher = cachedImageFetcher;

  // Determine how many thumbnails can be put onto one row.
  float thumbnailWithPx = PicViewConfig.ALBUM_THUMBNAIL_SIZE
      * displayMetrics.density;
  slotsPerRow = (int) Math
      .floor(displayMetrics.widthPixels / thumbnailWithPx);
  Log.d(TAG, "Photos per row: " + slotsPerRow);
  slotWidth = displayMetrics.widthPixels / slotsPerRow;
}
 
开发者ID:sdrausty,项目名称:buildAPKsSamples,代码行数:32,代码来源:MultiColumnImageAdapter.java

示例2: getPathToDb

import com.google.android.apps.picview.PicViewConfig; //导入依赖的package包/类
/**
 * Returns a file for the data base with the given name.
 */
protected static File getPathToDb(String dbName) {
  String sdCardPath = Environment.getExternalStorageDirectory()
      .getAbsolutePath();
  return new File(sdCardPath + File.separator + "data" + File.separator
      + PicViewConfig.APP_NAME_PATH + File.separator + dbName);
}
 
开发者ID:sdrausty,项目名称:buildAPKsSamples,代码行数:10,代码来源:AbstractPicViewDatabase.java


注:本文中的com.google.android.apps.picview.PicViewConfig类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。