2014-06-09 3 views
3
내가 LinearLayout

, 내가 LinearLayout스케일 후 왼쪽 하단에 LinearLayout을 정렬하는 방법은 무엇입니까?

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

내가 스케일 후 왼쪽 botton을 정렬 할 확장 할 수 있습니다. 내가 어떻게 이걸 만들 수 있니?

내가 만들 때 :

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()); 

내가 "규모 후"결과가 규모 전에 피벗 점을 설정하는

enter image description here

답변

6

시도를 (그림 참조) :

yourLayout.setPivotX(0); // Left 
yourLayout.setPivotY(yourLayout.getHeight()); // Bottom 
0

두 번째 방법은 하나의 부모 Relativelayout을 선형 배치로 가져 와서 ali를 설정하는 것입니다. gn_parentBottom = true이고 align_parentLeft = true ... 이것이 도움이되기를 바랍니다. 나는 이것을 시험해 내지 못한다 ...