本文整理汇总了Java中com.github.chrisbanes.photoview.OnPhotoTapListener类的典型用法代码示例。如果您正苦于以下问题:Java OnPhotoTapListener类的具体用法?Java OnPhotoTapListener怎么用?Java OnPhotoTapListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OnPhotoTapListener类属于com.github.chrisbanes.photoview包,在下文中一共展示了OnPhotoTapListener类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initView
import com.github.chrisbanes.photoview.OnPhotoTapListener; //导入依赖的package包/类
private void initView(FrameLayout frameLayout) {
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT);
layoutParams.gravity = Gravity.CENTER;
/* 图片加载进度圈 */
CircleProgress progress = getProgressView(getActivity());
mProgressModelLoader = new ProgressModelLoader(getHandler(progress));
if (url.endsWith(".gif")) {
GifMovieView gifView = new GifMovieView(frameLayout.getContext());
gifView.setLayoutParams(layoutParams);
gifView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// 点击图片返回
getActivity().onBackPressed();
}
});
frameLayout.addView(gifView);
progress.inject(gifView);
loadPic(url, gifView, true);
} else {
PhotoView photoView = new PhotoView(frameLayout.getContext());
photoView.setLayoutParams(layoutParams);
photoView.setOnPhotoTapListener(new OnPhotoTapListener() {
@Override
public void onPhotoTap(ImageView view, float x, float y) {
// 点击图片返回
getActivity().onBackPressed();
}
});
frameLayout.addView(photoView);
progress.inject(photoView);
loadPic(url, photoView, false);
}
}
示例2: setTapListener
import com.github.chrisbanes.photoview.OnPhotoTapListener; //导入依赖的package包/类
public void setTapListener(OnPhotoTapListener tapListener) {
this.tapListener = tapListener;
}
示例3: OnPhotoTapListener
import com.github.chrisbanes.photoview.OnPhotoTapListener; //导入依赖的package包/类
void OnPhotoTapListener(View view, float v, float v1);