2011-06-05 104 views

回答

1

尝试在FrameLayout本身上设置drawable。 因为wrap_content,FrameLayout将与文本大小相同,所以背景也是如此。动画应该只影响绘图,而不是实际的布局,所以当您为其制作动画时,它应该仍然有效。

<FrameLayout 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:background="@drawable/your_background"> 
    <TextView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="Hello World" /> 
</FrameLayout> 
相关问题