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)
Try to set the pivot point before scale it:
yourLayout.setPivotX(0); // Left
yourLayout.setPivotY(yourLayout.getHeight()); // Bottom
there are second way take one parent Relativelayout to your linearlayout and set align_parentBottom=true and align_parentLeft=true...i hope this will help you. i havent try this...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.