ThreeDLayout
项目地址:
githubwing/ThreeDLayout
简介:将 view 放入此 layout,就会出现 3D 效果
A 3D Layout,When you use it warp other view,it can became a 3D view
preview
How to Use
1.Let ThreeDLayout as your parent view(Tips:ThreeDLayout can only have one child)
<com.wingsofts.threedlayout.ThreeDLayout
android:background="@color/colorPrimary"
android:id="@+id/td_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="@+id/textView"
android:text="30℃"
android:textColor="#fff"
android:gravity="center"
android:textSize="80sp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</com.wingsofts.threedlayout.ThreeDLayout>
then,you can call method
//set touch mode enable
layout.setTouchable(true);
//set touch mode
layout.setTouchMode(ThreeDLayout.MODE_BOTH_X_Y);
//start turn Animate
startVerticalAnimate(long duration);
startVerticalAnimateDelayed(final long delayed, final long duration)
startHorizontalAnimate(long duration)
startHorizontalAnimateDelayed(final long delayed, final long duration)
//start loop animate
startHorizontalAnimate()
//stop loop animate
stopAnimate()