当前位置: 首页>>代码示例>>Java>>正文


Java ViewUtils类代码示例

本文整理汇总了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;
}
 
开发者ID:arpit,项目名称:BasicFreeFlowProject,代码行数:8,代码来源:MainFragment.java

示例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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:ArtbookLayout.java

示例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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:HLayout.java

示例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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:VLayout.java

示例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());

}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:53,代码来源:FreeFlowContainer.java


注:本文中的com.comcast.freeflow.utils.ViewUtils类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。