本文整理匯總了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();
}