View view = findViewById(R.id.my_view); float pivotY = view.getHeight() / 2; view.setPivotY(pivotY);
View view = findViewById(R.id.my_view); float pivotY = 200; // Set the pivot point to be 200 pixels from the top view.setPivotY(pivotY);Package library: The setPivotY() method is part of the android.view.View package library.