本文整理汇总了Java中uk.co.senab.photoview.PhotoViewAttacher.OnViewTapListener类的典型用法代码示例。如果您正苦于以下问题:Java OnViewTapListener类的具体用法?Java OnViewTapListener怎么用?Java OnViewTapListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OnViewTapListener类属于uk.co.senab.photoview.PhotoViewAttacher包,在下文中一共展示了OnViewTapListener类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import uk.co.senab.photoview.PhotoViewAttacher.OnViewTapListener; //导入依赖的package包/类
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//如果没有虚拟按键则设置为全屏
if (!UIUtil.isHasNavigationBar(this)) {
getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LOW_PROFILE |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_FULLSCREEN);
}
if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) {
Window window = getWindow();
window.addFlags(LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(R.color.black);
}
mAttacher = new PhotoViewAttacher(mPhoto);
mAttacher.setOnViewTapListener(new OnViewTapListener() {
@Override public void onViewTap(View view, float x, float y) {
hideBottomOption();
}
});
}
示例2: onCreateView
import uk.co.senab.photoview.PhotoViewAttacher.OnViewTapListener; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View rootView = inflater.inflate(R.layout.photo_browser_image, container, false);
imageView = (ImageView)rootView.findViewById(R.id.imageView);
textView = (TextView)rootView.findViewById(R.id.textView);
attacher = new PhotoViewAttacher(imageView);
attacher.setOnViewTapListener(new OnViewTapListener() {
@Override
public void onViewTap(View view, float x, float y) {
((Loader)getActivity()).toggleActionBar();
}
});
if (caption == null || caption.isEmpty())
textView.setVisibility(View.INVISIBLE);
else
textView.setText(caption);
return rootView;
}
示例3: setOnViewTapListener
import uk.co.senab.photoview.PhotoViewAttacher.OnViewTapListener; //导入依赖的package包/类
@Override
public void setOnViewTapListener(OnViewTapListener listener) {
mAttacher.setOnViewTapListener(listener);
}
示例4: setOnViewTapListener
import uk.co.senab.photoview.PhotoViewAttacher.OnViewTapListener; //导入依赖的package包/类
@Override
public void setOnViewTapListener(OnViewTapListener listener) {
mAttacher.setOnViewTapListener(listener);
}
示例5: getOnViewTapListener
import uk.co.senab.photoview.PhotoViewAttacher.OnViewTapListener; //导入依赖的package包/类
@Override
@Deprecated
public OnViewTapListener getOnViewTapListener() {
return mAttacher.getOnViewTapListener();
}
示例6: setOnViewTapListener
import uk.co.senab.photoview.PhotoViewAttacher.OnViewTapListener; //导入依赖的package包/类
public void setOnViewTapListener(OnViewTapListener listener) {
this.mAttacher.setOnViewTapListener(listener);
}
示例7: getOnViewTapListener
import uk.co.senab.photoview.PhotoViewAttacher.OnViewTapListener; //导入依赖的package包/类
public OnViewTapListener getOnViewTapListener() {
return this.mAttacher.getOnViewTapListener();
}
示例8: getOnViewTapListener
import uk.co.senab.photoview.PhotoViewAttacher.OnViewTapListener; //导入依赖的package包/类
@Override
public OnViewTapListener getOnViewTapListener() {
return mAttacher.getOnViewTapListener();
}
示例9: getOnViewTapListener
import uk.co.senab.photoview.PhotoViewAttacher.OnViewTapListener; //导入依赖的package包/类
public OnViewTapListener getOnViewTapListener() {
return mAttacher.getOnViewTapListener();
}
示例10: getOnViewTapListener
import uk.co.senab.photoview.PhotoViewAttacher.OnViewTapListener; //导入依赖的package包/类
@Override
public OnViewTapListener getOnViewTapListener() {
return mAttacher.getOnViewTapListener();
}