本文整理汇总了Java中android.view.View.getScaleY方法的典型用法代码示例。如果您正苦于以下问题:Java View.getScaleY方法的具体用法?Java View.getScaleY怎么用?Java View.getScaleY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.view.View
的用法示例。
在下文中一共展示了View.getScaleY方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getCenterDeltaInScreenSpace
import android.view.View; //导入方法依赖的package包/类
public static int[] getCenterDeltaInScreenSpace(View v0, View v1, int[] delta) {
v0.getLocationInWindow(sLoc0);
v1.getLocationInWindow(sLoc1);
sLoc0[0] += (v0.getMeasuredWidth() * v0.getScaleX()) / 2;
sLoc0[1] += (v0.getMeasuredHeight() * v0.getScaleY()) / 2;
sLoc1[0] += (v1.getMeasuredWidth() * v1.getScaleX()) / 2;
sLoc1[1] += (v1.getMeasuredHeight() * v1.getScaleY()) / 2;
if (delta == null) {
delta = new int[2];
}
delta[0] = sLoc1[0] - sLoc0[0];
delta[1] = sLoc1[1] - sLoc0[1];
return delta;
}
示例2: viewToRect
import android.view.View; //导入方法依赖的package包/类
@Override
public void viewToRect(View v, Rect outRect) {
outRect.left = 0;
outRect.top = 0;
computeLocationRelativeToContainer(v, outRect);
// If a view is scaled, its position will also shift accordingly. For optimization, only
// consider this for the last node.
outRect.left += (1 - v.getScaleX()) * v.getWidth() / 2;
outRect.top += (1 - v.getScaleY()) * v.getHeight() / 2;
outRect.right = outRect.left + (int) (v.getScaleX() * v.getWidth());
outRect.bottom = outRect.top + (int) (v.getScaleY() * v.getHeight());
}
示例3: getScaleY
import android.view.View; //导入方法依赖的package包/类
public static float getScaleY(View view) {
if (View10.NEED_PROXY) {
return View10.wrap(view).getScaleY();
} else {
return view.getScaleY();
}
}
示例4: getValue
import android.view.View; //导入方法依赖的package包/类
/**
* This method gets the value of the named property from the View object.
*
* @param propertyConstant The property whose value should be returned
* @return float The value of the named property
*/
private float getValue(int propertyConstant) {
//final View.TransformationInfo info = mView.mTransformationInfo;
View v = mView.get();
if (v != null) {
switch (propertyConstant) {
case TRANSLATION_X:
//return info.mTranslationX;
return v.getTranslationX();
case TRANSLATION_Y:
//return info.mTranslationY;
return v.getTranslationY();
case ROTATION:
//return info.mRotation;
return v.getRotation();
case ROTATION_X:
//return info.mRotationX;
return v.getRotationX();
case ROTATION_Y:
//return info.mRotationY;
return v.getRotationY();
case SCALE_X:
//return info.mScaleX;
return v.getScaleX();
case SCALE_Y:
//return info.mScaleY;
return v.getScaleY();
case X:
//return v.mLeft + info.mTranslationX;
return v.getX();
case Y:
//return v.mTop + info.mTranslationY;
return v.getY();
case ALPHA:
//return info.mAlpha;
return v.getAlpha();
}
}
return 0;
}
示例5: runFocusScaleAnimation
import android.view.View; //导入方法依赖的package包/类
/**
* 焦点缩放动画
*
* @param oldOrNewFocusView
* @param
*/
protected void runFocusScaleAnimation(@Nullable View oldOrNewFocusView, float scaleX, float scaleY)
{
if (null == oldOrNewFocusView)
return;
if (scaleX != oldOrNewFocusView.getScaleX() || scaleY != oldOrNewFocusView.getScaleY())
{
oldOrNewFocusView.animate().scaleX(scaleX).scaleY(scaleY).setDuration(mAnimDuration).start();
}
}
示例6: getValue
import android.view.View; //导入方法依赖的package包/类
private float getValue(int propertyConstant) {
View v = (View) this.mView.get();
if (v != null) {
switch (propertyConstant) {
case 1:
return v.getTranslationX();
case 2:
return v.getTranslationY();
case 4:
return v.getScaleX();
case 8:
return v.getScaleY();
case 16:
return v.getRotation();
case 32:
return v.getRotationX();
case 64:
return v.getRotationY();
case 128:
return v.getX();
case 256:
return v.getY();
case 512:
return v.getAlpha();
}
}
return 0.0f;
}
示例7: updateView
import android.view.View; //导入方法依赖的package包/类
public void updateView(View v) {
if (v != null) {
this.alpha = v.getAlpha();
this.x = v.getX();
this.y = v.getY();
this.z = atLeastLollipop ? v.getZ() : 0;
this.width = v.getWidth();
this.height = v.getHeight();
this.expansionScaleX = v.getScaleX();
this.expansionScaleY = v.getScaleY();
this.dispositionAngle = v.getRotation();
this.dispositionAngleX = v.getRotationX();
this.dispositionAngleY = v.getRotationY();
}
}
示例8: getProperty
import android.view.View; //导入方法依赖的package包/类
@Override
protected float getProperty(View view) {
return view.getScaleY();
}
示例9: getScaleY
import android.view.View; //导入方法依赖的package包/类
public static float getScaleY(View view) {
return view.getScaleY();
}
示例10: getScaleY
import android.view.View; //导入方法依赖的package包/类
static float getScaleY(View view) {
return view.getScaleY();
}
示例11: getProperty
import android.view.View; //导入方法依赖的package包/类
@Override
protected void getProperty(View view, float[] returnValues) {
returnValues[0] = view.getScaleX();
returnValues[1] = view.getScaleY();
}
示例12: cacheData
import android.view.View; //导入方法依赖的package包/类
private void cacheData(View view) {
mPageScaleX = view.getScaleX();
mPageScaleY = view.getScaleY();
mScaleX = getScaleX();
mScaleY = getScaleY();
}