Example usage for android.widget RelativeLayout setScaleY

List of usage examples for android.widget RelativeLayout setScaleY

Introduction

In this page you can find the example usage for android.widget RelativeLayout setScaleY.

Prototype

public void setScaleY(float scaleY) 

Source Link

Document

Sets the amount that the view is scaled in Y around the pivot point, as a proportion of the view's unscaled width.

Usage

From source file:com.luseen.spacenavigation.BadgeHelper.java

/**
 * Show badge//from www  .  j  a v a  2  s .c o m
 *
 * @param view      target badge
 * @param badgeItem BadgeItem object
 */
static void showBadge(RelativeLayout view, BadgeItem badgeItem) {

    Utils.changeViewVisibilityVisible(view);
    TextView badgeTextView = (TextView) view.findViewById(R.id.badge_text_view);
    badgeTextView.setText(badgeItem.getBadgeText());

    view.setScaleX(0);
    view.setScaleY(0);

    ViewCompat.animate(view).setDuration(200).scaleX(1).scaleY(1).setListener(new SimpleViewAnimatorListener() {
        @Override
        public void onAnimationEnd(View view) {
            Utils.changeViewVisibilityVisible(view);
        }
    }).start();
}