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


Java PhotoView.setBackgroundColor方法代码示例

本文整理汇总了Java中uk.co.senab.photoview.PhotoView.setBackgroundColor方法的典型用法代码示例。如果您正苦于以下问题:Java PhotoView.setBackgroundColor方法的具体用法?Java PhotoView.setBackgroundColor怎么用?Java PhotoView.setBackgroundColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在uk.co.senab.photoview.PhotoView的用法示例。


在下文中一共展示了PhotoView.setBackgroundColor方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getView

import uk.co.senab.photoview.PhotoView; //导入方法依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup container) {
    MediaBean mediaBean = mMediaList.get(position);
    if (convertView == null) {
        convertView = View.inflate(container.getContext(), R.layout.gallery_media_image_preview_item, null);
    }
    PhotoView ivImage = (PhotoView) convertView.findViewById(R.id.iv_media_image);
    String path = null;
    if (mediaBean.getWidth() > 1200 || mediaBean.getHeight() > 1200) {
        path = mediaBean.getThumbnailBigPath();
    }
    if (TextUtils.isEmpty(path)) {
        path = mediaBean.getOriginalPath();
    }
    ivImage.setBackgroundColor(mPageColor);
    mConfiguration.getImageLoader().displayImage(container.getContext(), path, ivImage, mDefaultImage, mConfiguration.getImageConfig(),
            false, mConfiguration.isPlayGif(), mScreenWidth, mScreenHeight, mediaBean.getOrientation());
    return convertView;
}
 
开发者ID:Loofer,项目名称:Watermark,代码行数:20,代码来源:MediaPreviewAdapter.java

示例2: onCreate

import uk.co.senab.photoview.PhotoView; //导入方法依赖的package包/类
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    ZoomableImageActivityIntentBuilder.inject(getIntent(), this);
    PhotoView view = new PhotoView(this);

    view.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.venue_rooms));
    view.setBackgroundColor(ContextCompat.getColor(this, android.R.color.white));
    getSupportActionBar().setTitle(R.string.venue_see_rooms);
    setContentView(view);
}
 
开发者ID:Nilhcem,项目名称:droidconde-2016,代码行数:12,代码来源:ZoomableImageActivity.java

示例3: onCreate

import uk.co.senab.photoview.PhotoView; //导入方法依赖的package包/类
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    ZoomableImageActivityIntentBuilder.inject(getIntent(), this);
    PhotoView view = new PhotoView(this);

    // No drawable-nodpi venue_rooms file
    view.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.venue_rooms));
    view.setBackgroundColor(ContextCompat.getColor(this, android.R.color.white));
    getSupportActionBar().setTitle(R.string.venue_see_rooms);
    setContentView(view);
}
 
开发者ID:Nilhcem,项目名称:devfestnantes-2016,代码行数:13,代码来源:ZoomableImageActivity.java

示例4: onCreate

import uk.co.senab.photoview.PhotoView; //导入方法依赖的package包/类
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    ZoomableImageActivityIntentBuilder.inject(getIntent(), this);
    PhotoView view = new PhotoView(this);

    // No drawable-nodpi venue_rooms file
    // view.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.venue_rooms));
    view.setBackgroundColor(ContextCompat.getColor(this, android.R.color.white));
    getSupportActionBar().setTitle(R.string.venue_see_rooms);
    setContentView(view);
}
 
开发者ID:Nilhcem,项目名称:mobilization-2016,代码行数:13,代码来源:ZoomableImageActivity.java

示例5: initWidget

import uk.co.senab.photoview.PhotoView; //导入方法依赖的package包/类
public View initWidget(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {

        View contextView = inflater.inflate(R.layout.item_imageslooker_photoview, container, false);

//        setContentView(R.layout.activity_imagelooker_main);

        mPhotoView = (PhotoView) contextView.findViewById(R.id.photoview);
        gifImageView = (GifView) contextView.findViewById(R.id.gifImageView);
//        mPhotoView.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
        mPhotoView.setBackgroundColor(0);
        // The MAGIC happens here!
//        mAttacher = new PhotoViewAttacher(mPhotoView);

        // Lets attach some listeners, not required though!
//        mAttacher.setOnMatrixChangeListener(new MatrixChangeListener());
//        mAttacher.setOnPhotoTapListener(new PhotoTapListener());
//        mAttacher.setAdapterWidth(true);

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
            mPhotoView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
        }

        rpb = (RoundProgressBar) contextView.findViewById(R.id.pb);

//        LogUtils.printLog(ImagesLookerPhotoViewFragment.class, "rpb:" + rpb);
//        Drawable bitmap = getResources().getDrawable(R.drawable.default_pic);
//        mPhotoView.setImageDrawable(bitmap);

        // The MAGIC happens here!


//        mAttacher.setScale(1f, 0, 0, true);

        imageView = mPhotoView;
        return contextView;
    }
 
开发者ID:BigAppOS,项目名称:BigApp_Discuz_Android,代码行数:38,代码来源:ImagesLookerPhotoViewFragment.java


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