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

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -