当前位置: 首页>>代码示例>>Java>>正文


Java OnPhotoTapListener类代码示例

本文整理汇总了Java中uk.co.senab.photoview.PhotoViewAttacher.OnPhotoTapListener的典型用法代码示例。如果您正苦于以下问题:Java OnPhotoTapListener类的具体用法?Java OnPhotoTapListener怎么用?Java OnPhotoTapListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


OnPhotoTapListener类属于uk.co.senab.photoview.PhotoViewAttacher包,在下文中一共展示了OnPhotoTapListener类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreateView

import uk.co.senab.photoview.PhotoViewAttacher.OnPhotoTapListener; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
	final View v = inflater.inflate(R.layout.gushi_image_detail_fragment, container, false);
	mImageView = (ImageView) v.findViewById(R.id.image);
	mAttacher = new PhotoViewAttacher(mImageView);
	
	mAttacher.setOnPhotoTapListener(new OnPhotoTapListener() {
		
		@Override
		public void onPhotoTap(View arg0, float arg1, float arg2) {
			getActivity().finish();
		}
	});
	
	progressBar = (ProgressBar) v.findViewById(R.id.loading);
	return v;
}
 
开发者ID:macyuan,项目名称:TAG,代码行数:18,代码来源:ImageDetailFragment.java

示例2: onCreate

import uk.co.senab.photoview.PhotoViewAttacher.OnPhotoTapListener; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_main);

	mapView = (MapView) findViewById(R.id.mapImageView);
	attacher = new PhotoViewAttacher(mapView);
	mapView.attacher = attacher;
	mapView.directionsView = (DirectionsView) findViewById(R.id.directions_view);
	attacher.setMaximumScale(6);

	// Listener called when it's tapped
	attacher.setOnPhotoTapListener(new OnPhotoTapListener() {

		@Override
		public void onPhotoTap(View arg0, float arg1, float arg2) {

			// X and Y positions relative to image. For example, middle of image
			// is 0.5, 0.5
			mapView.handleUserTap(arg1, arg2);
			mapView.invalidate();
		}
	});
	
}
 
开发者ID:luckytoilet,项目名称:WATisRain,代码行数:26,代码来源:MainActivity.java

示例3: init

import uk.co.senab.photoview.PhotoViewAttacher.OnPhotoTapListener; //导入依赖的package包/类
/**
 * 
 */
private void init() {
    if (!isInEditMode()) {
        mTagBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.tag);
        mTagWidth = mTagBitmap.getWidth();
        mTagHeight = mTagBitmap.getHeight();
    }

    setOnPhotoTapListener(new OnPhotoTapListener() {
        @Override
        public void onPhotoTap(View view, float x, float y) {
            if (mClickListener == null) {
                return;
            }
            RectF rectfF = getDisplayRect();
            float pointX = x * rectfF.width();
            float pointY = y * rectfF.height();
            //
            for (int i = 0; i < mTouchRects.length; i++) {
                if (mTouchRects[i].contains(pointX, pointY)) {
                    mClickListener.onTagClicked(i, mTags[i], mTouchRects[i]);
                }
            }
        }
    });
}
 
开发者ID:likebamboo,项目名称:GravityShake,代码行数:29,代码来源:PhotoViewWithTag.java

示例4: onCreate

import uk.co.senab.photoview.PhotoViewAttacher.OnPhotoTapListener; //导入依赖的package包/类
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView((int) R.layout.b8);
    ButterKnife.inject((Activity) this);
    this.mAttacher = new PhotoViewAttacher(this.mIvPhoto);
    this.mAttacher.setOnPhotoTapListener(new OnPhotoTapListener() {
        public void onPhotoTap(View view, float v, float v2) {
            DushouExampleActivity.this.finish();
        }
    });
    ImageLoader.getInstance().displayImage("", this.mIvPhoto, ImageLoaderOptions.global((int)
            R.drawable.rs));
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:14,代码来源:DushouExampleActivity.java

示例5: onCreateView

import uk.co.senab.photoview.PhotoViewAttacher.OnPhotoTapListener; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    if (BuildConfig.DEBUG) Log.d(getLogTag(), "onCreateView");
    mLayout = (RelativeLayout) inflater.inflate(
            R.layout.photoviewer_fragment, container, false);
    mVideoButton = (ImageView) mLayout.findViewById(
            R.id.play_video_overlay);
    mImageView = (ImageView) mLayout.findViewById(R.id.image);
    mAttacher = new PhotoViewAttacher(mImageView);
    mTextViewTitle = (TextView) mLayout.findViewById(R.id.textViewTitle);
    mTextViewAuthor = (TextView) mLayout.findViewById(R.id.textViewAuthor);
    mProgress = (ProgressBar) mLayout.findViewById(R.id.progress);

    mAttacher.setOnPhotoTapListener(new OnPhotoTapListener() {
        @Override
        public void onPhotoTap(View view, float x, float y) {
            BusProvider.getInstance().post(
                    new PhotoViewerVisibilityChangeEvent(
                            !mActionBar.isShowing(), PhotoViewerFragment.this)
            );
        }
    });

    /* If this fragment is new as part of a set, update it's overlay
     * visibility based on the state of the actionbar */
    setOverlayVisibility(mActionBar.isShowing());

    displayImage();

    return mLayout;
}
 
开发者ID:brk3,项目名称:glimmr,代码行数:33,代码来源:PhotoViewerFragment.java

示例6: getOnPhotoTapListener

import uk.co.senab.photoview.PhotoViewAttacher.OnPhotoTapListener; //导入依赖的package包/类
private OnPhotoTapListener getOnPhotoTapListener(final Activity activity) {
    return new OnPhotoTapListener() {

        @Override
        public void onPhotoTap(View view, float x, float y) {
            Intent intent = new Intent(Constants.Broadcast.BROADCAST_TOGGLE_FULLSCREEN);
            intent.putExtra(Constants.Extra.EXTRA_IS_SYSTEM_UI_VISIBLE, mSystemUiStateProvider.isSystemUiVisible());
            LocalBroadcastManager.getInstance(activity).sendBroadcast(intent);
        }
    };
}
 
开发者ID:antew,项目名称:RedditInPictures,代码行数:12,代码来源:ImageViewerFragment.java

示例7: setOnPhotoTapListener

import uk.co.senab.photoview.PhotoViewAttacher.OnPhotoTapListener; //导入依赖的package包/类
@Override
public void setOnPhotoTapListener(OnPhotoTapListener listener) {
    mAttacher.setOnPhotoTapListener(listener);
}
 
开发者ID:joelan,项目名称:ClouldReader,代码行数:5,代码来源:PhotoView.java

示例8: setOnPhotoTapListener

import uk.co.senab.photoview.PhotoViewAttacher.OnPhotoTapListener; //导入依赖的package包/类
@Override
public void setOnPhotoTapListener(OnPhotoTapListener listener) {
	mAttacher.setOnPhotoTapListener(listener);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:PhotoView.java

示例9: getOnPhotoTapListener

import uk.co.senab.photoview.PhotoViewAttacher.OnPhotoTapListener; //导入依赖的package包/类
@Override
@Deprecated
public OnPhotoTapListener getOnPhotoTapListener() {
    return mAttacher.getOnPhotoTapListener();
}
 
开发者ID:Loofer,项目名称:Watermark,代码行数:6,代码来源:PhotoView.java

示例10: setOnPhotoTapListener

import uk.co.senab.photoview.PhotoViewAttacher.OnPhotoTapListener; //导入依赖的package包/类
public void setOnPhotoTapListener(OnPhotoTapListener listener) {
    this.mAttacher.setOnPhotoTapListener(listener);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:PhotoView.java

示例11: getOnPhotoTapListener

import uk.co.senab.photoview.PhotoViewAttacher.OnPhotoTapListener; //导入依赖的package包/类
public OnPhotoTapListener getOnPhotoTapListener() {
    return this.mAttacher.getOnPhotoTapListener();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:PhotoView.java

示例12: getOnPhotoTapListener

import uk.co.senab.photoview.PhotoViewAttacher.OnPhotoTapListener; //导入依赖的package包/类
@Override
public OnPhotoTapListener getOnPhotoTapListener() {
    return mAttacher.getOnPhotoTapListener();
}
 
开发者ID:timothymiko,项目名称:narrate-android,代码行数:5,代码来源:PhotoView.java

示例13: getOnPhotoTapListener

import uk.co.senab.photoview.PhotoViewAttacher.OnPhotoTapListener; //导入依赖的package包/类
public OnPhotoTapListener getOnPhotoTapListener() {
    return mAttacher.getOnPhotoTapListener();
}
 
开发者ID:razerdp,项目名称:FriendCircle,代码行数:4,代码来源:PhotoViewEx.java

示例14: getOnPhotoTapListener

import uk.co.senab.photoview.PhotoViewAttacher.OnPhotoTapListener; //导入依赖的package包/类
@Override
public OnPhotoTapListener getOnPhotoTapListener() {
	return mAttacher.getOnPhotoTapListener();
}
 
开发者ID:hehonghui,项目名称:AndroidImageBrowser,代码行数:5,代码来源:PhotoView.java


注:本文中的uk.co.senab.photoview.PhotoViewAttacher.OnPhotoTapListener类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。