Android编程之界面跳动提示动画效果实现方法

2019-12-10 19:52:10王冬梅

易采站长站为您分析Android编程之界面跳动提示动画效果实现方法,实例分析了Android动画效果的布局及功能相关实现技巧,具有一定参考借鉴价值,需要的朋友可以参考下

本文实例讲述了Android编程之界面跳动提示动画效果实现方法。,具体如下:

上一个效果图:

Android编程之界面跳动提示动画效果实现方法

Android编程之界面跳动提示动画效果实现方法

先上布局:

 

  1. <RelativeLayout xmlns:android="http://www.easck.com/apk/res/android"  xmlns:tools="http://www.easck.com/tools" 
  2. android:layout_width="match_parent"  android:layout_height="match_parent" > 
  3. <RelativeLayout  android:id="@+id/red" 
  4. android:layout_width="match_parent"  android:layout_height="match_parent" 
  5. android:background="#ff0000" >  <TextView 
  6. android:layout_width="wrap_content"  android:layout_height="wrap_content" 
  7. android:layout_above="@+id/switch2blue"  android:layout_centerHorizontal="true" 
  8. android:text="首页" />  <Button 
  9. android:id="@+id/switch2blue"  android:layout_width="wrap_content" 
  10. android:layout_height="wrap_content"  android:layout_centerInParent="true" 
  11. android:text="置换位蓝色" />  </RelativeLayout> 
  12. <RelativeLayout  android:id="@+id/blue" 
  13. android:layout_width="match_parent"  android:layout_height="match_parent" 
  14. android:background="#0000ff" >  <TextView 
  15. android:layout_width="wrap_content"  android:layout_height="wrap_content" 
  16. android:layout_above="@+id/switch2red"  android:layout_centerHorizontal="true" 
  17. android:text="第二页" />  <Button