本文整理汇总了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;
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}