本文整理汇总了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);
}
}
开发者ID:liying2008,项目名称:Simpler,代码行数:36,代码来源:PictureFragment.java
示例2: setTapListener
import com.github.chrisbanes.photoview.OnPhotoTapListener; //导入依赖的package包/类
public void setTapListener(OnPhotoTapListener tapListener) {
this.tapListener = tapListener;
}
开发者ID:RadiationX,项目名称:ForPDA,代码行数:4,代码来源:ImagesAdapter.java
示例3: OnPhotoTapListener
import com.github.chrisbanes.photoview.OnPhotoTapListener; //导入依赖的package包/类
void OnPhotoTapListener(View view, float v, float v1);
开发者ID:angcyo,项目名称:RLibrary,代码行数:2,代码来源:ImagePageAdapter.java
注:本文中的com.github.chrisbanes.photoview.OnPhotoTapListener类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论