Android studio :实现2D翻转
一、准备
1、需要两张图片
2、了解FrameLayout布局
二、具体代码实现
xml代码:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/root"
tools:context=".MainActivity">
<ImageView
android:id="@+id/a"
android:src="@drawable/a"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<ImageView
android:id="@+id/b"
android:src="@drawable/b"
android:layout_width="match_parent"
android:layout_h