當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。