public class MainActivity extends Activity {
LinearLayout rotator;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
rotator = (LinearLayout) findViewById(R.id.rotator);
ObjectAnimator rotation = ObjectAnimator.ofFloat(rotator, "rotationY", 0, 360);
rotation.setDuration(3000);
rotation.start();
}
}
I've got above code, which is rotating View around Y axis. Problem is, that the perspective seems to be too "strong" - the edge of view that is in foreground becomes too big and the edge in background becomes too small. Is there any possibility to "lower down" the perspecitve factor?
So this is the solution for all screen densities.