本文整理匯總了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;
}