本文整理汇总了Java中org.chromium.content.browser.PositionObserver类的典型用法代码示例。如果您正苦于以下问题:Java PositionObserver类的具体用法?Java PositionObserver怎么用?Java PositionObserver使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PositionObserver类属于org.chromium.content.browser包,在下文中一共展示了PositionObserver类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: HandleView
import org.chromium.content.browser.PositionObserver; //导入依赖的package包/类
HandleView(CursorController controller, int pos, View parent,
PositionObserver parentPositionObserver) {
super(parent.getContext());
Context context = parent.getContext();
mParent = parent;
mController = controller;
mContainer = new PopupWindow(context, null, android.R.attr.textSelectHandleWindowStyle);
mContainer.setSplitTouchEnabled(true);
mContainer.setClippingEnabled(false);
TypedArray a = context.obtainStyledAttributes(TEXT_VIEW_HANDLE_ATTRS);
mTextSelectHandleLeftRes = a.getResourceId(a.getIndex(LEFT), 0);
mTextSelectHandleRes = a.getResourceId(a.getIndex(CENTER), 0);
mTextSelectHandleRightRes = a.getResourceId(a.getIndex(RIGHT), 0);
a.recycle();
setOrientation(pos);
// Convert line offset dips to pixels.
mLineOffsetY = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
LINE_OFFSET_Y_DIP, context.getResources().getDisplayMetrics());
mAlpha = 1.f;
mParentPositionListener = new PositionObserver.Listener() {
@Override
public void onPositionChanged(int x, int y) {
updateParentPosition(x, y);
}
};
mParentPositionObserver = parentPositionObserver;
}
示例2: SelectionHandleController
import org.chromium.content.browser.PositionObserver; //导入依赖的package包/类
public SelectionHandleController(View parent, PositionObserver positionObserver) {
mParent = parent;
mPositionObserver = positionObserver;
}
示例3: InsertionHandleController
import org.chromium.content.browser.PositionObserver; //导入依赖的package包/类
public InsertionHandleController(View parent, PositionObserver positionObserver) {
mParent = parent;
mContext = parent.getContext();
mPositionObserver = positionObserver;
}