本文整理汇总了Java中com.comcast.freeflow.utils.ViewUtils类的典型用法代码示例。如果您正苦于以下问题:Java ViewUtils类的具体用法?Java ViewUtils怎么用?Java ViewUtils使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ViewUtils类属于com.comcast.freeflow.utils包,在下文中一共展示了ViewUtils类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getLayout
import com.comcast.freeflow.utils.ViewUtils; //导入依赖的package包/类
private FreeFlowLayout getLayout(){
int ht = (int)ViewUtils.dipToPixels(getActivity(), 60);
VLayout.LayoutParams p = new VLayout.LayoutParams( ht, 1500, ht );
VLayout v = new VLayout();
v.setLayoutParams(p);
return v;
}
示例2: getItemAt
import com.comcast.freeflow.utils.ViewUtils; //导入依赖的package包/类
@Override
public FreeFlowItem getItemAt(float x, float y) {
return (FreeFlowItem) ViewUtils.getItemAt(map, (int) x, (int) y);
}
示例3: getItemAt
import com.comcast.freeflow.utils.ViewUtils; //导入依赖的package包/类
@Override
public FreeFlowItem getItemAt(float x, float y){
return ViewUtils.getItemAt(proxies, (int)x, (int)y);
}
示例4: getItemAt
import com.comcast.freeflow.utils.ViewUtils; //导入依赖的package包/类
@Override
public FreeFlowItem getItemAt(float x, float y) {
return ViewUtils.getItemAt(proxies, (int) x, (int) y);
}
示例5: touchDown
import com.comcast.freeflow.utils.ViewUtils; //导入依赖的package包/类
protected void touchDown(MotionEvent event) {
if(isAnimatingChanges){
layoutAnimator.onContainerTouchDown(event);
}
/*
* Recompute this just to be safe. TODO: We should optimize this to be
* only calculated when a data or layout change happens
*/
mScrollableHeight = mLayout.getContentHeight() - getHeight();
mScrollableWidth = mLayout.getContentWidth() - getWidth();
if (mTouchMode == TOUCH_MODE_FLING) {
// Wait for some time to see if the user is just trying
// to speed up the scroll
postDelayed(new Runnable() {
@Override
public void run() {
if (mTouchMode == TOUCH_MODE_DOWN) {
if (mTouchMode == TOUCH_MODE_DOWN) {
scroller.forceFinished(true);
}
}
}
}, FLYWHEEL_TIMEOUT);
}
beginTouchAt = ViewUtils.getItemAt(frames,
(int) (viewPortX + event.getX()),
(int) (viewPortY + event.getY()));
deltaX = event.getX();
deltaY = event.getY();
mTouchMode = TOUCH_MODE_DOWN;
if (mOnTouchModeChangedListener != null) {
mOnTouchModeChangedListener.onTouchModeChanged(mTouchMode);
}
if (mPendingCheckForTap != null) {
removeCallbacks(mPendingCheckForTap);
mPendingCheckForLongPress = null;
}
if (beginTouchAt != null) {
mPendingCheckForTap = new CheckForTap();
}
postDelayed(mPendingCheckForTap, ViewConfiguration.getTapTimeout());
}