Android TextView的3D旋转不适用于Jelly Bean(4.3)
我对Android果冻豆的旋转方法有一个奇怪的问题 我设置了旋转的动画,当用户将手指向左/向右移动时,LinearLayout在其Y轴上旋转 在这个线性布局中有两个文本视图。如果我为LinearLayout设置旋转值,这些文本视图(更好地说是文本视图的内容)将消失(在屏幕上) 如果我仅尝试旋转文本视图,则会出现相同的问题 这种轮换在版本更大的Android手机上运行,比如sharm 下面是解释问题的截图 旋转前 旋转后 代码非常简单:Android TextView的3D旋转不适用于Jelly Bean(4.3),android,android-layout,rotation,textview,android-4.2-jelly-bean,Android,Android Layout,Rotation,Textview,Android 4.2 Jelly Bean,我对Android果冻豆的旋转方法有一个奇怪的问题 我设置了旋转的动画,当用户将手指向左/向右移动时,LinearLayout在其Y轴上旋转 在这个线性布局中有两个文本视图。如果我为LinearLayout设置旋转值,这些文本视图(更好地说是文本视图的内容)将消失(在屏幕上) 如果我仅尝试旋转文本视图,则会出现相同的问题 这种轮换在版本更大的Android手机上运行,比如sharm 下面是解释问题的截图 旋转前 旋转后 代码非常简单: void rotate container(float
void rotate container(float rotate){
container.setRotationY(rotate);
}
用户界面:
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_marginBottom="16dp"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:layout_marginTop="16dp"
android:background="@color/white"
android:orientation="vertical">
<TextView
style="@style/title"
android:layout_width="match_parent"
android:layout_height="56dp"
android:gravity="center"
android:padding="16dp"/>
<TextView
style="@style/body"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:padding="16dp"/>
</LinearLayout>
</FrameLayout>
我希望有人能帮助我:)