2012-09-29 2 views
0

회전 후에 생성 된 모든 여분의 간격을 제거해야합니까? 요소가 원래 너비를 새 너비로 사용하는 대신 원래 너비로 유지합니다.객체의 안드로이드 회전 및 여분의 공간

제안을 환영합니다.

<Button 
     android:id="@+id/button2" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:rotation="90" 
     android:text="Button" /> 

    <Button 
     android:id="@+id/button1" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="Button" /> 

</LinearLayout> 

답변

0

당신이 구성 요소에 대한 애니메이션을 적용

enter image description here

.

해당 구성 요소를 옮겼다는 것을 나타냅니다.

실제로는 구성 요소는 원래 위치가입니다.

원래 위치에서 움직이지 않습니다.

당신은 안드로이드 제한을 말할 수 있습니다.

하지만 지금은 당신은 위의 3.0 이상을 시도 할 수 있습니다 API 레벨 3.0

에 해결된다. 이상

+0

this를 읽을 I했습니다 (14)에의 minSdkVersion (안드로이드 4) 인상 시도하지만이 같은 결과를 얻을. 버튼을 오른쪽으로 정렬하면 원래의 너비가 변경되지 않으므로 좋을 공간을 최소화 할 수 있습니다. – aviran

관련 문제