本文整理汇总了Java中uk.co.senab.photoview.PhotoViewAttacher.update方法的典型用法代码示例。如果您正苦于以下问题:Java PhotoViewAttacher.update方法的具体用法?Java PhotoViewAttacher.update怎么用?Java PhotoViewAttacher.update使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类uk.co.senab.photoview.PhotoViewAttacher
的用法示例。
在下文中一共展示了PhotoViewAttacher.update方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onSuccess
import uk.co.senab.photoview.PhotoViewAttacher; //导入方法依赖的package包/类
@Override
public void onSuccess() {
if (mWr.get() == null || mWr.get().mImageView == null) {
return;
}
mWr.get().dismissProgressDialog();
Drawable drawable = mWr.get().mImageView.getDrawable();
PhotoViewAttacher attacher = mWr.get().mAttacher;
if (attacher != null) {
if (drawable.getIntrinsicHeight() > (drawable.getIntrinsicWidth() << 2)) {
// handle the super height image.
int scale = drawable.getIntrinsicHeight() / drawable.getIntrinsicWidth();
scale = Math.min(MAX_SCALE, scale);
attacher.setMaximumScale(scale);
attacher.setScale(scale, true);
}
attacher.update();
}
BoxingViewActivity activity = mWr.get().getThisActivity();
if (activity != null && activity.mGallery != null) {
activity.mGallery.setVisibility(View.VISIBLE);
}
}
示例2: instantiateItem
import uk.co.senab.photoview.PhotoViewAttacher; //导入方法依赖的package包/类
@Override
public Object instantiateItem(ViewGroup container, int position) {
PhotoView photoView = new PhotoView(container.getContext());
photoView.setImageResource(sDrawables[position]);
PhotoViewAttacher attacher = new PhotoViewAttacher(photoView);
attacher.setRotatable(true);
attacher.setToRightAngle(true);
attacher.setOnRotateListener(new PhotoViewAttacher.OnRotateListener() {
@Override
public void onRotate(int degree) {
//do something
}
});
attacher.update();
// Now just add PhotoView to ViewPager and return it
container.addView(photoView, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
return photoView;
}
示例3: instantiateItem
import uk.co.senab.photoview.PhotoViewAttacher; //导入方法依赖的package包/类
@Override
@SuppressWarnings("NewApi")
public Object instantiateItem(ViewGroup container, int position) {
View v = inflater.inflate(R.layout.view_pdf_page, container, false);
ImageView iv = (ImageView) v.findViewById(R.id.imageView);
if (renderer == null || getCount() < position) {
return v;
}
PdfRenderer.Page page = getPDFPage(renderer, position);
Bitmap bitmap = bitmapContainer.get(position);
page.render(bitmap, null, null, PdfRenderer.Page.RENDER_MODE_FOR_DISPLAY);
page.close();
PhotoViewAttacher attacher = new PhotoViewAttacher(iv);
attacher.setScale(scale.getScale(), scale.getCenterX(), scale.getCenterY(), true);
attacher.setOnMatrixChangeListener(this);
attachers.put(position, new WeakReference<PhotoViewAttacher>(attacher));
iv.setImageBitmap(bitmap);
attacher.setOnPhotoTapListener(new PhotoViewAttacher.OnPhotoTapListener() {
@Override
public void onPhotoTap(View view, float x, float y) {
if (pageClickListener != null) {
pageClickListener.onPageTap(view, x, y);
}
}
});
attacher.update();
container.addView(v, 0);
return v;
}
示例4: instantiateItem
import uk.co.senab.photoview.PhotoViewAttacher; //导入方法依赖的package包/类
@Override
public Object instantiateItem(ViewGroup container, int position) {
View view = View.inflate(UIUtils.getContext(), R.layout.item_image_scale, null);
ImageView image = (ImageView) view.findViewById(R.id.image);
Glide.with(UIUtils.getContext()).load(HttpHelper.URL + "image?name=" + mDatas.get(position)).into(image);
PhotoViewAttacher photoViewAttacher = new PhotoViewAttacher(image);
photoViewAttacher.update();
container.addView(image);
return view;
}
示例5: onCreateView
import uk.co.senab.photoview.PhotoViewAttacher; //导入方法依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.image_fragment_layout,container,false);
ImageView imageView = (ImageView) view;
ImageLoader.load(getActivity(),mUrl,imageView);
PhotoViewAttacher attacher = new PhotoViewAttacher(imageView);
attacher.update();
attacher.setScaleType(ImageView.ScaleType.FIT_CENTER);
return view;
}
示例6: instantiateItem
import uk.co.senab.photoview.PhotoViewAttacher; //导入方法依赖的package包/类
@Override
@SuppressWarnings("NewApi")
public Object instantiateItem(ViewGroup container, int position) {
View v = inflater.inflate(R.layout.view_pdf_page, container, false);
ImageView iv = (ImageView) v.findViewById(R.id.imageView);
if (renderer == null || getCount() < position) {
return v;
}
PdfRenderer.Page page = getPDFPage(renderer, position);
Bitmap bitmap = bitmapContainer.get(position);
page.render(bitmap, null, null, PdfRenderer.Page.RENDER_MODE_FOR_DISPLAY);
page.close();
PhotoViewAttacher attacher = new PhotoViewAttacher(iv);
attacher.setScale(scale.getScale(), scale.getCenterX(), scale.getCenterY(), true);
attacher.setOnMatrixChangeListener(this);
attachers.put(position, new WeakReference<PhotoViewAttacher>(attacher));
iv.setImageBitmap(bitmap);
attacher.setOnPhotoTapListener(new PhotoViewAttacher.OnPhotoTapListener() {
@Override
public void onPhotoTap(View view, float x, float y) {
pageClickListener.onClick(view);
}
});
attacher.update();
((ViewPager) container).addView(v, 0);
return v;
}
示例7: initSubViews
import uk.co.senab.photoview.PhotoViewAttacher; //导入方法依赖的package包/类
@Override
public void initSubViews(View view) {
super.initSubViews(view);
ImageLoader.loadImage(getArguments().getString("url"),
meiziImageView, getContext());
mAttacher = new PhotoViewAttacher(meiziImageView);
mAttacher.update();
}
示例8: onViewCreated
import uk.co.senab.photoview.PhotoViewAttacher; //导入方法依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
mImageView = (ImageView) view;
mAttacher = new PhotoViewAttacher(mImageView);
mAttacher.update();
PicassoProvider.getInstance(getActivity().getApplicationContext(), false)
.load(getImageUrl())
.networkPolicy(NetworkPolicy.NO_STORE, NetworkPolicy.OFFLINE)
.memoryPolicy(MemoryPolicy.NO_STORE)
.placeholder(R.mipmap.ic_stub_dashboard_item)
.into(mImageView);
}
示例9: load
import uk.co.senab.photoview.PhotoViewAttacher; //导入方法依赖的package包/类
private void load() {
progressWheel.setVisibility(View.VISIBLE);
reloadView.setVisibility(View.GONE);
pictureView.setVisibility(View.GONE);
ImageRequest imageRequest = new ImageRequest(
pictureURL,
new Response.Listener<Bitmap>() {
@Override
public void onResponse(Bitmap bitmap) {
originBitmap = bitmap;
pictureView.setImageBitmap(bitmap);
PhotoViewAttacher photoViewAttacher = new PhotoViewAttacher(pictureView);
photoViewAttacher.setZoomable(true);
photoViewAttacher.update();
progressWheel.setVisibility(View.GONE);
reloadView.setVisibility(View.GONE);
pictureView.setVisibility(View.VISIBLE);
}
},
0,
0,
Bitmap.Config.ARGB_8888,
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError volleyError) {
progressWheel.setVisibility(View.GONE);
reloadView.setVisibility(View.VISIBLE);
pictureView.setVisibility(View.GONE);
}
}
);
requestQueue.add(imageRequest);
}
示例10: onStart
import uk.co.senab.photoview.PhotoViewAttacher; //导入方法依赖的package包/类
@Override
protected void onStart() {
super.onStart();
this.findViewById(R.id.fullscreen_content).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
view.setSystemUiVisibility(UI_HIDE_OPTIONS);
}
});
fullscreenImage = (ImageView)findViewById(R.id.fullscreen_content);
fullscreenImage.setOnSystemUiVisibilityChangeListener(new SysUiVisibilityListener());
photoAttacher = new PhotoViewAttacher(fullscreenImage);
photoAttacher.setOnPhotoTapListener(new PhotoTapListener());
if (retained == null) {
retained = new DataFragment();
fragmentManager.beginTransaction().add(retained, "data").commit();
Bundle b = getIntent().getExtras();
url = b.getString("image_url_" + b.getInt("position") + "_" + pickLoadSize(PreferenceManager.getDefaultSharedPreferences(this)));
networkRequest();
} else {
image = retained.image;
fullscreenImage.setImageBitmap(image);
photoAttacher.update();
}
this.getWindow().getDecorView().setSystemUiVisibility(UI_HIDE_OPTIONS);
}
开发者ID:gina-alaska,项目名称:gina-puffinfeeder-android-viewer,代码行数:31,代码来源:FullscreenImageViewerActivity.java
示例11: onAfterViews
import uk.co.senab.photoview.PhotoViewAttacher; //导入方法依赖的package包/类
@Override
public void onAfterViews() {
photo_view.setImageResource(R.mipmap.warehouse_location);
PhotoViewAttacher photoViewAttacher = new PhotoViewAttacher(photo_view);
photoViewAttacher.update();
}
示例12: initView
import uk.co.senab.photoview.PhotoViewAttacher; //导入方法依赖的package包/类
@Override
protected void initView() {
ImageLoader.load(mActivity, mUrl, mImageView);
PhotoViewAttacher attacher = new PhotoViewAttacher(mImageView);
attacher.update();
}