android - 3D rotation - perspective -



android - 3D rotation - perspective -

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, rotating view around y axis. problem is, perspective seems "strong" - border of view in foreground becomes big , border in background becomes small. there possibility "lower down" perspecitve factor?

int distance = 1900; float scale = getresources().getdisplaymetrics().density; rotator.setcameradistance(distance * scale);

so solution screen densities.

android animation 3d rotation perspective

Comments

Popular posts from this blog

php - Edges appear in image after resizing -

ios8 - iOS custom keyboard - preserve state between appearances -

Delphi change the assembly code of a running process -