Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How LinearLayout align in left bottom after Scale?

i have LinearLayout, i scale LinearLayout

ll.setScaleX(0.8f);
ll.setScaleY(0.8f);

I want to align left botton after Scale. How i can make this?

When i make:

Display mdisp = getWindowManager().getDefaultDisplay();
Point mdispSize = new Point();
mdisp.getSize(mdispSize);
maxX = mdispSize.x; 
maxY = mdispSize.y;
commonCardContainer.setX(0);
commonCardContainer.setY(maxY - commonCardContainer.getHeight());

I have result "after scale" (see picture)

enter image description here

like image 621
bvv Avatar asked Dec 25 '22 08:12

bvv


1 Answers

Try to set the pivot point before scale it:

yourLayout.setPivotX(0); // Left
yourLayout.setPivotY(yourLayout.getHeight()); // Bottom
like image 169
adboco Avatar answered Dec 28 '22 06:12

adboco