android旋转对象和额外的间距

时间:2012-09-29 07:26:24

标签: android rotation

我需要摆脱旋转后创建的所有额外间距? 看起来元素保持原始宽度,而不是使用原始高度作为新宽度。

欢迎提出建议。

enter image description here     

    <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>

1 个答案:

答案 0 :(得分:0)

将任何动画应用于组件时。

它表明您已移动该组件。

但实际上组件保留其原始位置

它不会从原来的位置移动。

你可以说它的android限制。

但现在它已在 API级别3.0

中解决

您可以尝试 3.0或更高版本。

更多阅读this