當前位置: 首頁>>代碼示例>>Java>>正文


Java ViewCompat.setPivotX方法代碼示例

本文整理匯總了Java中android.support.v4.view.ViewCompat.setPivotX方法的典型用法代碼示例。如果您正苦於以下問題:Java ViewCompat.setPivotX方法的具體用法?Java ViewCompat.setPivotX怎麽用?Java ViewCompat.setPivotX使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.support.v4.view.ViewCompat的用法示例。


在下文中一共展示了ViewCompat.setPivotX方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: handleRightPage

import android.support.v4.view.ViewCompat; //導入方法依賴的package包/類
@Override
public void handleRightPage(View view, float position) {
    ViewCompat.setTranslationX(view, -view.getWidth() * position);

    ViewCompat.setPivotX(view, view.getWidth() * 0.5f);
    ViewCompat.setPivotY(view, view.getHeight() * 0.5f);
    ViewCompat.setScaleX(view, 1 + position);
    ViewCompat.setScaleY(view, 1 + position);

    if (position > 0.95f) {
        ViewCompat.setAlpha(view, 0);
    } else {
        ViewCompat.setAlpha(view, 1);
    }
}
 
開發者ID:devzwy,項目名稱:NeiHanDuanZiTV,代碼行數:16,代碼來源:ZoomStackPageTransformer.java

示例2: handleLeftPage

import android.support.v4.view.ViewCompat; //導入方法依賴的package包/類
@Override
public void handleLeftPage(View view, float position) {
    ViewCompat.setTranslationX(view, -view.getWidth() * position);

    ViewCompat.setPivotX(view, view.getWidth() * 0.5f);
    ViewCompat.setPivotY(view, view.getHeight() * 0.5f);
    ViewCompat.setScaleX(view, 1 + position);
    ViewCompat.setScaleY(view, 1 + position);

    if (position < -0.95f) {
        ViewCompat.setAlpha(view, 0);
    } else {
        ViewCompat.setAlpha(view, 1);
    }
}
 
開發者ID:devzwy,項目名稱:NeiHanDuanZiTV,代碼行數:16,代碼來源:ZoomStackPageTransformer.java

示例3: handleRightPage

import android.support.v4.view.ViewCompat; //導入方法依賴的package包/類
@Override
public void handleRightPage(View view, float position) {
    ViewCompat.setTranslationX(view, -view.getWidth() * position);

    ViewCompat.setPivotX(view, view.getWidth() * 0.5f);
    ViewCompat.setPivotY(view, view.getHeight() * 0.5f);
    ViewCompat.setScaleX(view, 1 - position);
    ViewCompat.setScaleY(view, 1 - position);

    if (position > 0.95f) {
        ViewCompat.setAlpha(view, 0);
    } else {
        ViewCompat.setAlpha(view, 1);
    }
}
 
開發者ID:liu-xiao-dong,項目名稱:JD-Test,代碼行數:16,代碼來源:ZoomCenterPageTransformer.java

示例4: handleLeftPage

import android.support.v4.view.ViewCompat; //導入方法依賴的package包/類
@Override
public void handleLeftPage(View view, float position) {
    ViewCompat.setTranslationX(view, -view.getWidth() * position);

    ViewCompat.setPivotX(view, view.getWidth() * 0.5f);
    ViewCompat.setPivotY(view, view.getHeight() * 0.5f);
    ViewCompat.setScaleX(view, 1 + position);
    ViewCompat.setScaleY(view, 1 + position);

    ViewCompat.setAlpha(view, 1 + position);
}
 
開發者ID:devzwy,項目名稱:NeiHanDuanZiTV,代碼行數:12,代碼來源:ZoomFadePageTransformer.java

示例5: clear

import android.support.v4.view.ViewCompat; //導入方法依賴的package包/類
public static void clear(View v) {
    ViewCompat.setAlpha(v, 1);
    ViewCompat.setScaleY(v, 1);
    ViewCompat.setScaleX(v, 1);
    ViewCompat.setTranslationY(v, 0);
    ViewCompat.setTranslationX(v, 0);
    ViewCompat.setRotation(v, 0);
    ViewCompat.setRotationY(v, 0);
    ViewCompat.setRotationX(v, 0);
    ViewCompat.setPivotY(v, v.getMeasuredHeight() / 2);
    ViewCompat.setPivotX(v, v.getMeasuredWidth() / 2);
    ViewCompat.animate(v).setInterpolator(null).setStartDelay(0);
}
 
開發者ID:angcyo,項目名稱:RLibrary,代碼行數:14,代碼來源:ViewHelper.java

示例6: handleRightPage

import android.support.v4.view.ViewCompat; //導入方法依賴的package包/類
@Override
public void handleRightPage(View view, float position) {
    ViewCompat.setPivotX(view, 0);
    ViewCompat.setPivotY(view, view.getMeasuredHeight() * 0.5f);
    ViewCompat.setRotationY(view, mMaxRotation * position);
}
 
開發者ID:weileng11,項目名稱:KUtils-master,代碼行數:7,代碼來源:CubePageTransformer.java

示例7: handleLeftPage

import android.support.v4.view.ViewCompat; //導入方法依賴的package包/類
@Override
public void handleLeftPage(View view, float position) {
    ViewCompat.setPivotX(view, view.getWidth());
    ViewCompat.setScaleX(view, 1.0f + position);
}
 
開發者ID:devzwy,項目名稱:NeiHanDuanZiTV,代碼行數:6,代碼來源:AccordionPageTransformer.java

示例8: handleRightPage

import android.support.v4.view.ViewCompat; //導入方法依賴的package包/類
@Override
public void handleRightPage(View view, float position) {
    ViewCompat.setPivotX(view, 0);
    ViewCompat.setScaleX(view, 1.0f - position);
    ViewCompat.setAlpha(view, 1);
}
 
開發者ID:weileng11,項目名稱:KUtils-master,代碼行數:7,代碼來源:AccordionPageTransformer.java

示例9: handleInvisiblePage

import android.support.v4.view.ViewCompat; //導入方法依賴的package包/類
@Override
public void handleInvisiblePage(View view, float position) {
    ViewCompat.setPivotX(view, view.getMeasuredWidth());
    ViewCompat.setPivotY(view, view.getMeasuredHeight() * 0.5f);
    ViewCompat.setRotationY(view, 0);
}
 
開發者ID:liu-xiao-dong,項目名稱:JD-Test,代碼行數:7,代碼來源:CubePageTransformer.java

示例10: handleInvisiblePage

import android.support.v4.view.ViewCompat; //導入方法依賴的package包/類
@Override
public void handleInvisiblePage(View view, float position) {
    ViewCompat.setPivotX(view, view.getMeasuredWidth() * 0.5f);
    ViewCompat.setPivotY(view, view.getMeasuredHeight());
    ViewCompat.setRotation(view, 0);
}
 
開發者ID:weileng11,項目名稱:KUtils-master,代碼行數:7,代碼來源:RotatePageTransformer.java

示例11: handleLeftPage

import android.support.v4.view.ViewCompat; //導入方法依賴的package包/類
@Override
public void handleLeftPage(View view, float position) {
    ViewCompat.setPivotX(view, view.getMeasuredWidth());
    ViewCompat.setPivotY(view, view.getMeasuredHeight() * 0.5f);
    ViewCompat.setRotationY(view, mMaxRotation * position);
}
 
開發者ID:devzwy,項目名稱:NeiHanDuanZiTV,代碼行數:7,代碼來源:CubePageTransformer.java

示例12: preAnimateAddImpl

import android.support.v4.view.ViewCompat; //導入方法依賴的package包/類
@Override
protected void preAnimateAddImpl(RecyclerView.ViewHolder holder) {
    ViewCompat.setPivotX(holder.itemView, holder.itemView.getWidth());
    ViewCompat.setScaleX(holder.itemView, 0);
    ViewCompat.setScaleY(holder.itemView, 0);
}
 
開發者ID:angcyo,項目名稱:RLibrary,代碼行數:7,代碼來源:ScaleInRightAnimator.java


注:本文中的android.support.v4.view.ViewCompat.setPivotX方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。