android - Setting the size and position of a Surface View -
i'm working on interface 1 half of screen has edit text boxes user enter data into, , other half has canvas can drawn , reads user touches.
right i'm extending surface view , adding layout(layout xml) @ runtime view.addview.
my problem setting size , position of view. want square , take half of screen (landscape). want aligned right side , either centered vertically, or aligned top.
i can set size overriding onmeasure method, don't know how display size don't know set to.
i don't have ideas how align view, i've been trying adding various layouts without luck...
thanks help!
have same question. did find answer?
i figured out. modify onlayout(), set like:
view child=getchildat(0); child.layout(100,100,300,300);
and not touch onmeasure().
Comments
Post a Comment