本文整理了Java中android.widget.ImageView.performClick()
方法的一些代码示例,展示了ImageView.performClick()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.performClick()
方法的具体详情如下:
包路径:android.widget.ImageView
类名称:ImageView
方法名:performClick
暂无
代码示例来源:origin: qiujuer/Genius-Android
@Override
public boolean performClick() {
final TouchEffectDrawable d = mTouchDrawable;
if (d != null) {
return d.performClick(this) && super.performClick();
} else
return super.performClick();
}
代码示例来源:origin: qiujuer/Genius-Android
@Override
public boolean performClick() {
final TouchEffectDrawable d = mTouchDrawable;
if (d != null) {
return d.performClick(this) && super.performClick();
} else
return super.performClick();
}
代码示例来源:origin: lipangit/JiaoZiVideoPlayer
@Override
public void onAudioFocusChange(int focusChange) {
switch (focusChange) {
case AudioManager.AUDIOFOCUS_GAIN:
break;
case AudioManager.AUDIOFOCUS_LOSS:
releaseAllVideos();
Log.d(TAG, "AUDIOFOCUS_LOSS [" + this.hashCode() + "]");
break;
case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT:
try {
Jzvd player = JzvdMgr.getCurrentJzvd();
if (player != null && player.currentState == Jzvd.CURRENT_STATE_PLAYING) {
player.startButton.performClick();
}
} catch (IllegalStateException e) {
e.printStackTrace();
}
Log.d(TAG, "AUDIOFOCUS_LOSS_TRANSIENT [" + this.hashCode() + "]");
break;
case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK:
break;
}
}
};
代码示例来源:origin: CarGuo/GSYVideoPlayer
@Override
public void onBackPressed() {
//先返回正常状态
if (orientationUtils.getScreenType() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
videoPlayer.getFullscreenButton().performClick();
return;
}
//释放所有
videoPlayer.setVideoAllCallBack(null);
super.onBackPressed();
}
}
代码示例来源:origin: lipangit/JiaoZiVideoPlayer
public static void startFullscreen(Context context, Class _class, JZDataSource jzDataSource) {
hideSupportActionBar(context);
JZUtils.setRequestedOrientation(context, FULLSCREEN_ORIENTATION);
ViewGroup vp = (JZUtils.scanForActivity(context))//.getWindow().getDecorView();
.findViewById(Window.ID_ANDROID_CONTENT);
View old = vp.findViewById(R.id.jz_fullscreen_id);
if (old != null) {
vp.removeView(old);
}
try {
Constructor<Jzvd> constructor = _class.getConstructor(Context.class);
final Jzvd jzvd = constructor.newInstance(context);
jzvd.setId(R.id.jz_fullscreen_id);
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
vp.addView(jzvd, lp);
// final Animation ra = AnimationUtils.loadAnimation(context, R.anim.start_fullscreen);
// jzVideoPlayer.setAnimation(ra);
jzvd.setUp(jzDataSource, JzvdStd.SCREEN_WINDOW_FULLSCREEN);
CLICK_QUIT_FULLSCREEN_TIME = System.currentTimeMillis();
jzvd.startButton.performClick();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
}
代码示例来源:origin: rmtheis/android-ocr
@Override
public boolean performClick() {
boolean result = super.performClick();
playSoundEffect(SoundEffectConstants.CLICK);
if (mListener != null) {
mListener.onShutterButtonClick(this);
}
return result;
}
}
代码示例来源:origin: CarGuo/GSYVideoPlayer
@Override
public void onBackPressed() {
//先返回正常状态
if (orientationUtils.getScreenType() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
videoPlayer.getFullscreenButton().performClick();
return;
}
//释放所有
videoPlayer.setVideoAllCallBack(null);
GSYVideoManager.releaseAllVideos();
if (isTransition && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
super.onBackPressed();
} else {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
finish();
overridePendingTransition(R.anim.abc_fade_in, R.anim.abc_fade_out);
}
}, 500);
}
}
代码示例来源:origin: CarGuo/GSYVideoPlayer
@Override
public void onBackPressed() {
//先返回正常状态
if (orientationUtils.getScreenType() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
videoPlayer.getFullscreenButton().performClick();
return;
}
//释放所有
videoPlayer.setVideoAllCallBack(null);
GSYVideoManager.releaseAllVideos();
if (isTransition && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
super.onBackPressed();
} else {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
finish();
overridePendingTransition(R.anim.abc_fade_in, R.anim.abc_fade_out);
}
}, 500);
}
}
代码示例来源:origin: jaydenxiao2016/AndroidFire
public static void startFullscreen(Context context, Class _class, String url, Object... objects) {
hideSupportActionBar(context);
ViewGroup vp = (ViewGroup) (JCUtils.getAppCompActivity(context)).findViewById(Window.ID_ANDROID_CONTENT);
View old = vp.findViewById(JCVideoPlayer.FULLSCREEN_ID);
if (old != null) {
vp.removeView(old);
}
try {
Constructor<JCVideoPlayer> constructor = _class.getConstructor(Context.class);
JCVideoPlayer jcVideoPlayer = constructor.newInstance(context);
jcVideoPlayer.setId(JCVideoPlayerStandard.FULLSCREEN_ID);
WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
int w = wm.getDefaultDisplay().getWidth();
int h = wm.getDefaultDisplay().getHeight();
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(h, w);
lp.setMargins((w - h) / 2, -(w - h) / 2, 0, 0);
vp.addView(jcVideoPlayer, lp);
final Animation ra = AnimationUtils.loadAnimation(context, R.anim.start_fullscreen);
jcVideoPlayer.setAnimation(ra);
jcVideoPlayer.setUp(url, JCVideoPlayerStandard.SCREEN_WINDOW_FULLSCREEN, objects);
jcVideoPlayer.addTextureView();
jcVideoPlayer.setRotation(90);
jcVideoPlayer.startButton.performClick();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
}
代码示例来源:origin: hidroh/materialistic
@Override
public void onClick(View v) {
final int toastMessageResId;
if (!mItem.isFavorite()) {
mFavoriteManager.add(ItemActivity.this, mItem);
toastMessageResId = R.string.toast_saved;
} else {
mFavoriteManager.remove(ItemActivity.this, mItem.getId());
toastMessageResId = R.string.toast_removed;
}
if (!mUndo) {
Snackbar.make(mCoordinatorLayout, toastMessageResId, Snackbar.LENGTH_SHORT)
.setAction(R.string.undo, v1 -> {
mUndo = true;
mBookmark.performClick();
})
.show();
}
mUndo = false;
}
});
代码示例来源:origin: iMeiji/Toutiao
jcVideo.setUp(urls, JZVideoPlayerStandard.SCREEN_WINDOW_NORMAL, videoTitle);
if (SettingUtil.getInstance().getIsVideoAutoPlay()) {
jcVideo.startButton.performClick();
代码示例来源:origin: takahirom/PreLollipopTransition
@Override
public void run() {
assertTrue(imageView.performClick());
}
});
代码示例来源:origin: takahirom/PreLollipopTransition
@Override
public void run() {
assertTrue(imageView.performClick());
}
});
代码示例来源:origin: takahirom/PreLollipopTransition
@Override
public void run() {
assertTrue(imageView.performClick());
assertTrue(imageView2.performClick());
}
});
代码示例来源:origin: takahirom/PreLollipopTransition
@Override
public void run() {
assertTrue(imageView.performClick());
}
});
代码示例来源:origin: takahirom/PreLollipopTransition
@Override
public void run() {
assertTrue(imageView3.performClick());
}
});
代码示例来源:origin: aserbao/AndroidCamera
@Override
public void isArriveCountDown() {
mBtnRecordIv.performClick();
}
});
代码示例来源:origin: vikramezhil/DroidSpeech
@Override
public void run()
{
// Stop listening
stop.performClick();
}
});
代码示例来源:origin: JmStefanAndroid/PVCloudGroupn
@Override
public void onBackPressed() {
if (isBigPicShow && expandedImageView != null) {
expandedImageView.performClick();
return;
}
super.onBackPressed();
}
代码示例来源:origin: xiaohaibin/OpenEyes
@Override
public void onBackPressed() {
//先返回正常状态
if (orientationUtils.getScreenType() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
videoPlayer.getFullscreenButton().performClick();
return;
}
//释放所有
videoPlayer.setVideoAllCallBack(null);
super.onBackPressed();
}
内容来源于网络,如有侵权,请联系作者删除!