效果图:

结构图:

测试代码:

布局:

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 3     android:layout_width="fill_parent"
 4     android:layout_height="wrap_content"
 5     android:background="@drawable/bg"
 6     android:orientation="vertical"
 7     android:paddingTop="10dp" >
 8
 9     <Spinner
10         android:id="@+id/animation_sp"
11         android:layout_width="fill_parent"
12         android:layout_height="wrap_content" >
13     </Spinner>
14
15     <Button
16         android:id="@+id/other_button"
17         android:layout_width="fill_parent"
18         android:layout_height="wrap_content"
19         android:text="打开Other窗口" >
20     </Button>
21
22 </LinearLayout>

main.xml

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 3     android:layout_width="fill_parent"
 4     android:layout_height="fill_parent"
 5     android:background="@drawable/bg"
 6     android:orientation="vertical" >
 7
 8     <TextView
 9         android:layout_width="fill_parent"
10         android:layout_height="wrap_content"
11         android:gravity="center"
12         android:text="这是Other窗口" />
13
14 </LinearLayout>

other.xml

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <resources>
 3     <string-array name="anim_type">
 4         <item>淡入淡出效果</item>
 5         <item>放大淡出效果</item>
 6         <item>转动淡出效果1</item>
 7         <item>转动淡出效果2</item>
 8         <item>左上角展开淡出效果</item>
 9         <item>压缩变小淡出效果</item>
10         <item>右往左推出效果</item>
11         <item>下往上推出效果</item>
12         <item>左右交错效果</item>
13         <item>放大淡出效果</item>
14         <item>缩小效果</item>
15         <item>上下交错效果</item>
16     </string-array>
17 </resources>

arrays.xml

JAVA代码:

  1 package com.iteye.androidtoast;
  2
  3 import java.util.ArrayList;
  4 import java.util.List;
  5
  6 import android.app.Activity;
  7 import android.content.Intent;
  8 import android.os.Bundle;
  9 import android.view.View;
 10 import android.view.View.OnClickListener;
 11 import android.widget.ArrayAdapter;
 12 import android.widget.Button;
 13 import android.widget.Spinner;
 14
 15 public class MainActivity extends Activity {
 16
 17     /** Called when the activity is first created. */
 18     @Override
 19     public void onCreate(Bundle savedInstanceState) {
 20         super.onCreate(savedInstanceState);
 21         setContentView(R.layout.main);
 22
 23         final Spinner mAnimSp = (Spinner) findViewById(R.id.animation_sp);
 24         Button mButton=(Button) findViewById(R.id.other_button);
 25
 26         // 通过资源文件获取Spinner填充内容
 27         String[] ls = getResources().getStringArray(R.array.anim_type);
 28         List<String> list = new ArrayList<String>();
 29         // 把数组内容填充 到集合
 30         for (int i = 0; i < ls.length; i++) {
 31             list.add(ls[i]);
 32         }
 33         ArrayAdapter<String> animType = new ArrayAdapter<String>(this,
 34                 android.R.layout.simple_spinner_item, list);
 35         animType.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
 36         mAnimSp.setAdapter(animType);
 37         mAnimSp.setSelection(0);
 38
 39         mButton.setOnClickListener(new OnClickListener() {
 40             @Override
 41             public void onClick(View v) {
 42                 Intent intent = new Intent();
 43                 intent.setClass(MainActivity.this, OtherActivity.class);
 44                 startActivity(intent);
 45
 46                 switch (mAnimSp.getSelectedItemPosition()) {
 47                 case 0:
 48                     /*注意:此方法只能在startActivity和finish方法之后调用。
 49                       第一个参数为第一个Activity离开时的动画,第二参数为所进入的Activity的动画效果*/
 50                     overridePendingTransition(R.anim.fade, R.anim.hold);
 51                     break;
 52                 case 1:
 53                     overridePendingTransition(R.anim.my_scale_action,
 54                             R.anim.my_alpha_action);
 55                     break;
 56                 case 2:
 57                     overridePendingTransition(R.anim.scale_rotate,
 58                             R.anim.my_alpha_action);
 59                     break;
 60                 case 3:
 61                     overridePendingTransition(R.anim.scale_translate_rotate,
 62                             R.anim.my_alpha_action);
 63                     break;
 64                 case 4:
 65                     overridePendingTransition(R.anim.scale_translate,
 66                             R.anim.my_alpha_action);
 67                     break;
 68                 case 5:
 69                     overridePendingTransition(R.anim.hyperspace_in,
 70                             R.anim.hyperspace_out);
 71                     break;
 72                 case 6:
 73                     overridePendingTransition(R.anim.push_left_in,
 74                             R.anim.push_left_out);
 75                     break;
 76                 case 7:
 77                     overridePendingTransition(R.anim.push_up_in,
 78                             R.anim.push_up_out);
 79                     break;
 80                 case 8:
 81                     overridePendingTransition(R.anim.slide_left,
 82                             R.anim.slide_right);
 83                     break;
 84                 case 9:
 85                     overridePendingTransition(R.anim.wave_scale,
 86                             R.anim.my_alpha_action);
 87                     break;
 88                 case 10:
 89                     overridePendingTransition(R.anim.zoom_enter,
 90                             R.anim.zoom_exit);
 91                     break;
 92                 case 11:
 93                     overridePendingTransition(R.anim.slide_up_in,
 94                             R.anim.slide_down_out);
 95                     break;
 96                 }
 97             }
 98         });
 99     }
100 }

MainActivity.java

 1 package com.iteye.androidtoast;
 2
 3 import android.app.Activity;
 4 import android.os.Bundle;
 5 import android.view.KeyEvent;
 6
 7 public class OtherActivity extends Activity{
 8
 9     @Override
10     protected void onCreate(Bundle savedInstanceState) {
11         // TODO Auto-generated method stub
12         super.onCreate(savedInstanceState);
13         this.setContentView(R.layout.other);
14     }
15     @Override
16     public boolean onKeyDown(int keyCode, KeyEvent event) {
17         //如果按下的是返回键,并且没有重复
18         if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
19             finish();
20             overridePendingTransition(R.anim.slide_up_in, R.anim.slide_down_out);
21             return false;
22         }
23         return false;
24     }
25 }

OtherActivity.java

实现动画效果anim里的xml:

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <!-- Copyright (C) 2007 The Android Open Source Project
 3
 4      Licensed under the Apache License, Version 2.0 (the "License");
 5      you may not use this file except in compliance with the License.
 6      You may obtain a copy of the License at
 7
 8           http://www.apache.org/licenses/LICENSE-2.0
 9
10      Unless required by applicable law or agreed to in writing, software
11      distributed under the License is distributed on an "AS IS" BASIS,
12      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13      See the License for the specific language governing permissions and
14      limitations under the License.
15 -->
16 <!-- android:duration="@android:integer/config_longAnimTime" -->
17 <alpha xmlns:android="http://schemas.android.com/apk/res/android"
18        android:interpolator="@android:anim/accelerate_interpolator"
19        android:fromAlpha="0.0" android:toAlpha="1.0"
20        android:duration="2000" />

fade.xml

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <!-- Copyright (C) 2009 The Android Open Source Project
 3
 4      Licensed under the Apache License, Version 2.0 (the "License");
 5      you may not use this file except in compliance with the License.
 6      You may obtain a copy of the License at
 7
 8           http://www.apache.org/licenses/LICENSE-2.0
 9
10      Unless required by applicable law or agreed to in writing, software
11      distributed under the License is distributed on an "AS IS" BASIS,
12      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13      See the License for the specific language governing permissions and
14      limitations under the License.
15 -->
16 <!-- @android:integer/config_longAnimTime -->
17 <translate xmlns:android="http://schemas.android.com/apk/res/android"
18        android:interpolator="@android:anim/accelerate_interpolator"
19        android:fromXDelta="0" android:toXDelta="0"
20        android:duration="2000" />

hold.xml

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <!-- Copyright (C) 2007 The Android Open Source Project
 3
 4      Licensed under the Apache License, Version 2.0 (the "License");
 5      you may not use this file except in compliance with the License.
 6      You may obtain a copy of the License at
 7
 8           http://www.apache.org/licenses/LICENSE-2.0
 9
10      Unless required by applicable law or agreed to in writing, software
11      distributed under the License is distributed on an "AS IS" BASIS,
12      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13      See the License for the specific language governing permissions and
14      limitations under the License.
15 -->
16
17 <alpha xmlns:android="http://schemas.android.com/apk/res/android" android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="2000" android:startOffset="1200" />

hyperspace_in.xml

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <!-- Copyright (C) 2007 The Android Open Source Project Licensed under the
 3     Apache License, Version 2.0 (the "License"); you may not use this file except
 4     in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
 5     Unless required by applicable law or agreed to in writing, software distributed
 6     under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
 7     OR CONDITIONS OF ANY KIND, either express or implied. See the License for
 8     the specific language governing permissions and limitations under the License. -->
 9
10 <set xmlns:android="http://schemas.android.com/apk/res/android"
11     android:shareInterpolator="false">
12     <scale android:interpolator="@android:anim/accelerate_decelerate_interpolator"
13         android:fromXScale="1.0" android:toXScale="1.4" android:fromYScale="1.0"
14         android:toYScale="0.6" android:pivotX="50%" android:pivotY="50%"
15         android:fillAfter="false" android:duration="2000" />
16     <set android:interpolator="@android:anim/accelerate_interpolator"
17         android:startOffset="700">
18         <scale android:fromXScale="1.4" android:toXScale="0.0"
19             android:fromYScale="0.6" android:toYScale="0.0" android:pivotX="50%"
20             android:pivotY="50%" android:duration="2000" />
21         <rotate android:fromDegrees="0" android:toDegrees="-45"
22             android:toYScale="0.0" android:pivotX="50%" android:pivotY="50%"
23             android:duration="2000" />
24     </set>
25 </set>

hyperspace_out.xml

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <!-- android:duration="@android:integer/config_mediumAnimTime" -->
 3 <set xmlns:android="http://schemas.android.com/apk/res/android" >
 4 <alpha android:fromAlpha="1.0" android:toAlpha="0" android:duration="2000"/>
 5 <!-- 透明度控制动画效果 alpha
 6         浮点型值:
 7         fromAlpha 属性为动画起始时透明度
 8         toAlpha   属性为动画结束时透明度
 9         说明:
10         0.0表示完全透明
11         1.0表示完全不透明
12                      以上值取0.0-1.0之间的float数据类型的数字
13
14         长整型值:
15         duration  属性为动画持续时间
16         说明:
17                      时间以毫秒为单位
18 -->
19 </set>

my_alpha_action.xml

1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- android:duration="@android:integer/config_mediumAnimTime" -->
3 <set xmlns:android="http://schemas.android.com/apk/res/android">
4     <scale android:interpolator="@android:anim/accelerate_decelerate_interpolator"
5         android:fromXScale="0.0" android:toXScale="1.4" android:fromYScale="0.0"
6         android:toYScale="1.4" android:pivotX="50%" android:pivotY="50%"
7         android:fillAfter="false" android:duration="2000" />
8 </set>

my_scale_action.xml

1 <?xml version="1.0" encoding="utf-8"?>
2 <set xmlns:android="http://schemas.android.com/apk/res/android">
3     <translate android:fromXDelta="100%p" android:toXDelta="0"
4         android:duration="2000" />
5 </set>

push_left_in.xml

1 <?xml version="1.0" encoding="utf-8"?>
2 <set xmlns:android="http://schemas.android.com/apk/res/android">
3     <translate android:fromXDelta="0" android:toXDelta="-100%p"
4         android:duration="2000" />
5 </set>

push_left_out.xml

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <!-- Copyright (C) 2007 The Android Open Source Project
 3
 4      Licensed under the Apache License, Version 2.0 (the "License");
 5      you may not use this file except in compliance with the License.
 6      You may obtain a copy of the License at
 7
 8           http://www.apache.org/licenses/LICENSE-2.0
 9
10      Unless required by applicable law or agreed to in writing, software
11      distributed under the License is distributed on an "AS IS" BASIS,
12      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13      See the License for the specific language governing permissions and
14      limitations under the License.
15 -->
16
17 <set xmlns:android="http://schemas.android.com/apk/res/android">
18     <translate android:fromYDelta="100%p" android:toYDelta="0" android:duration="2000"/>
19     <alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="2000" />
20 </set>

push_up_in.xml

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <!-- Copyright (C) 2007 The Android Open Source Project
 3
 4      Licensed under the Apache License, Version 2.0 (the "License");
 5      you may not use this file except in compliance with the License.
 6      You may obtain a copy of the License at
 7
 8           http://www.apache.org/licenses/LICENSE-2.0
 9
10      Unless required by applicable law or agreed to in writing, software
11      distributed under the License is distributed on an "AS IS" BASIS,
12      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13      See the License for the specific language governing permissions and
14      limitations under the License.
15 -->
16
17 <set xmlns:android="http://schemas.android.com/apk/res/android">
18     <translate android:fromYDelta="0" android:toYDelta="-100%p" android:duration="2000"/>
19     <alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="2000" />
20 </set>

push_up_out.xml

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <!-- android:duration="@android:integer/config_mediumAnimTime" -->
 3 <set xmlns:android="http://schemas.android.com/apk/res/android"
 4     android:shareInterpolator="false">
 5     <scale android:interpolator="@android:res/anim/accelerate_decelerate_interpolator"
 6         android:fromXScale="0.0" android:toXScale="1.0" android:fromYScale="0.0"
 7         android:toYScale="1.0" android:pivotX="50%" android:pivotY="50%"
 8         android:duration="2000" android:repeatCount="0" android:startOffset="20"></scale>
 9     <rotate android:interpolator="@android:anim/accelerate_decelerate_interpolator"
10         android:fromDegrees="0" android:toDegrees="+355" android:pivotX="50%"
11         android:pivotY="50%" android:duration="2000" />
12 </set>

scale_rotate.xml

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <!-- android:duration="@android:integer/config_mediumAnimTime" -->
 3 <set xmlns:android="http://schemas.android.com/apk/res/android"
 4     android:shareInterpolator="false">
 5     <scale android:interpolator="@android:res/anim/accelerate_decelerate_interpolator"
 6         android:fromXScale="0.0" android:toXScale="1.0" android:fromYScale="0.0"
 7         android:toYScale="1.0" android:pivotX="50%" android:pivotY="50%"
 8         android:duration="2000"></scale>
 9     <translate android:interpolator="@android:anim/accelerate_decelerate_interpolator"
10         android:fromXDelta="120" android:toXDelta="30" android:fromYDelta="30"
11         android:toYDelta="250" android:duration="2000" />
12     <rotate android:interpolator="@android:anim/accelerate_decelerate_interpolator"
13         android:fromDegrees="0" android:toDegrees="+355" android:pivotX="50%"
14         android:pivotY="50%" android:duration="2000" />
15 </set>

scale_translate_rotate.xml

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <!-- android:duration="@android:integer/config_mediumAnimTime" -->
 3 <set xmlns:android="http://schemas.android.com/apk/res/android"
 4     android:shareInterpolator="false">
 5     <scale android:interpolator="@android:res/anim/accelerate_decelerate_interpolator"
 6         android:fromXScale="0.0" android:toXScale="1.0" android:fromYScale="0.0"
 7         android:toYScale="1.0" android:pivotX="0" android:pivotY="0"
 8         android:duration="2000" android:repeatCount="0" android:startOffset="0"></scale>
 9     <translate android:fromXDelta="0" android:toXDelta="0"
10         android:fromYDelta="0" android:toYDelta="0" android:duration="2000" />
11 </set>

scale_translate.xml

1 <?xml version="1.0" encoding="UTF-8"?>
2 <set android:interpolator="@android:anim/accelerate_interpolator"
3     xmlns:android="http://schemas.android.com/apk/res/android">
4     <translate android:duration="2000"
5         android:fromYDelta="0.0" android:toYDelta="100.0%p" />
6 </set>

slide_down_out.xml

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <!-- Copyright (C) 2007 The Android Open Source Project
 3
 4      Licensed under the Apache License, Version 2.0 (the "License");
 5      you may not use this file except in compliance with the License.
 6      You may obtain a copy of the License at
 7
 8           http://www.apache.org/licenses/LICENSE-2.0
 9
10      Unless required by applicable law or agreed to in writing, software
11      distributed under the License is distributed on an "AS IS" BASIS,
12      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13      See the License for the specific language governing permissions and
14      limitations under the License.
15 -->
16 <!-- android:duration="@android:integer/config_shortAnimTime" -->
17 <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_interpolator">
18     <translate android:fromXDelta="100%p" android:toXDelta="0"
19         android:duration="2000" />
20 </set>

slide_left.xml

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <!-- Copyright (C) 2007 The Android Open Source Project
 3
 4      Licensed under the Apache License, Version 2.0 (the "License");
 5      you may not use this file except in compliance with the License.
 6      You may obtain a copy of the License at
 7
 8           http://www.apache.org/licenses/LICENSE-2.0
 9
10      Unless required by applicable law or agreed to in writing, software
11      distributed under the License is distributed on an "AS IS" BASIS,
12      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13      See the License for the specific language governing permissions and
14      limitations under the License.
15 -->
16 <!-- android:duration="@android:integer/config_shortAnimTime" -->
17 <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_interpolator">
18     <translate android:fromXDelta="-100%p" android:toXDelta="0"
19             android:duration="2000" />
20 </set>

slide_right.xml

1 <?xml version="1.0" encoding="UTF-8"?>
2 <set android:interpolator="@android:anim/decelerate_interpolator"
3     xmlns:android="http://schemas.android.com/apk/res/android">
4     <translate android:duration="2000"
5         android:fromYDelta="100.0%p" android:toYDelta="0.0" />
6 </set>

slide_up_in.xml

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <!-- Copyright (C) 2007 The Android Open Source Project Licensed under the
 3     Apache License, Version 2.0 (the "License"); you may not use this file except
 4     in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
 5     Unless required by applicable law or agreed to in writing, software distributed
 6     under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
 7     OR CONDITIONS OF ANY KIND, either express or implied. See the License for
 8     the specific language governing permissions and limitations under the License. -->
 9
10 <set xmlns:android="http://schemas.android.com/apk/res/android"
11     android:interpolator="@android:anim/accelerate_interpolator">
12     <alpha android:fromAlpha="0.0" android:toAlpha="1.0"
13         android:duration="2000" />
14     <scale android:fromXScale="0.5" android:toXScale="1.5"
15         android:fromYScale="0.5" android:toYScale="1.5" android:pivotX="50%"
16         android:pivotY="50%" android:duration="2000" />
17     <scale android:fromXScale="1.5" android:toXScale="1.0"
18         android:fromYScale="1.5" android:toYScale="1.0" android:pivotX="50%"
19         android:pivotY="50%" android:startOffset="200" android:duration="2000" />
20 </set>

wave_scale.xml

 1 <?xml version="1.0" encoding="utf-8"?>
 2     <!--
 3         /* ** Copyright 2009, The Android Open Source Project ** ** Licensed
 4         under the Apache License, Version 2.0 (the "License"); ** you may not
 5         use this file except in compliance with the License. ** You may obtain
 6         a copy of the License at ** **
 7         http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by
 8         applicable law or agreed to in writing, software ** distributed under
 9         the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES
10         OR CONDITIONS OF ANY KIND, either express or implied. ** See the
11         License for the specific language governing permissions and **
12         limitations under the License. */
13     -->
14
15     <!--
16         Special window zoom animation: this is the element that enters the
17         screen, it starts at 200% and scales down. Goes with zoom_exit.xml.
18     -->
19 <!-- android:duration="@android:integer/config_mediumAnimTime" -->
20 <set xmlns:android="http://schemas.android.com/apk/res/android"
21     android:interpolator="@android:anim/decelerate_interpolator">
22     <alpha android:fromAlpha="0" android:toAlpha="1.0"
23         android:duration="2000" />
24     <scale android:fromXScale="2.0" android:toXScale="1.0"
25         android:fromYScale="2.0" android:toYScale="1.0" android:pivotX="50%p"
26         android:pivotY="50%p" android:duration="2000" />
27 </set>

zoom_enter.xml

 1 <?xml version="1.0" encoding="utf-8"?>
 2     <!--
 3         /* ** Copyright 2009, The Android Open Source Project ** ** Licensed
 4         under the Apache License, Version 2.0 (the "License"); ** you may not
 5         use this file except in compliance with the License. ** You may obtain
 6         a copy of the License at ** **
 7         http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by
 8         applicable law or agreed to in writing, software ** distributed under
 9         the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES
10         OR CONDITIONS OF ANY KIND, either express or implied. ** See the
11         License for the specific language governing permissions and **
12         limitations under the License. */
13     -->
14
15     <!--
16         Special window zoom animation: this is the element that enters the
17         screen, it starts at 200% and scales down. Goes with zoom_exit.xml.
18     -->
19 <!-- android:duration="@android:integer/config_mediumAnimTime" -->
20 <set xmlns:android="http://schemas.android.com/apk/res/android"
21     android:interpolator="@android:anim/decelerate_interpolator">
22     <alpha android:fromAlpha="0" android:toAlpha="1.0"
23         android:duration="2000" />
24     <scale android:fromXScale="2.0" android:toXScale="1.0"
25         android:fromYScale="2.0" android:toYScale="1.0" android:pivotX="50%p"
26         android:pivotY="50%p" android:duration="2000" />
27 </set>

zoom_exit.xml

转载于:https://www.cnblogs.com/zzw1994/p/5035913.html

activity切换动画特效相关推荐

  1. Android 动画之View动画效果和Activity切换动画效果

    View动画效果: 1.>>Tween动画 通过对View的内容进行一系列的图形变换(平移.缩放.旋转.透明度变换)实现动画效果,补间动画需要使用<set>节点作为根节点,子节 ...

  2. android activity切换动画

    今天,实在没有什么可以写的内容,在网上找了好久,才决定写今天的内容.自己还是想保持每天写博客的习惯. 在Android开发过程中,经常会碰到Activity之间的切换效果的问题,下面介绍一下如何实现左 ...

  3. Android 编程下设置 Activity 切换动画

    为 Activity 设置切换动画 我们知道,我们可以在 AndroidManifest.xml 文件中,通过 android:theme 属性设置 Activity 的主题.主题中定义了关于 Act ...

  4. Activity切换动画---点击哪里从哪放大

    本篇文章已授权微信公众号 安卓巴士Android开发者门户 独家发布 emmmm,这次来梳理一下 Activity 切换动画的研究.首先,老规矩,看一下效果图: 效果图 这次要实现的动画效果就是类似于 ...

  5. HTML+CSS css3电子杂志画册3D翻页切换动画特效

    style.css文件: @import url("https://fonts.googleapis.com/css?family=Sree+Krushnadevaraya&disp ...

  6. Android自定义Activity切换动画完全解析

    Android自定义Activity切换动画完全解析 在Android开发中,Activity之间的切换是最常见的业务场景了,而且系统默认的Activity之间的切换都是带动画效果的(右进右出).但是 ...

  7. [Android1.5]Android2.0版本以下Activity切换动画效果

    前言 在Android 2.0版本以上做Activity切换时的动画效果是很容易的,可以调用overridePendingTransition函数,一行代码搞定,当然配置动画效果的xml文件是少不了的 ...

  8. Activity 切换动画

    如果想设定应用的activity之间切换可以使用下面的属性 activityOpenEnterAnimation activityOpenExitAnimation activityCloseEnte ...

  9. Android开发中activity切换动画的实现

    (1)我们在MainAcitvity中定义两个textview,用于点击触发切换Activity事件,下面是布局文件代码. <LinearLayoutandroid:layout_width=& ...

最新文章

  1. 关于Centos下Clamv反病毒软件包更新问题
  2. 网络协议图形化分析工具EtherApe
  3. vi/vim 中批量在行插入或删除指定字符
  4. Activiti邮件任务
  5. 一文说通C#的属性Attribute
  6. java做报表_一步一步使用POI做java报表
  7. scala初学之Tuple、Array、Map、文件操作入门实战
  8. IO、NIO、AIO
  9. 不搞虚的!快速把你拉入Docker 的门里
  10. session 、cookie、token的区别
  11. EasyTalking微博系统
  12. STM32触摸屏校准数据的存取
  13. 计算机系统历史版本,全历史PC版
  14. 自定义报表制作的注意事项——思迈特软件Smartbi报表工具
  15. iOS文章 - 收藏集 - 掘金
  16. 在 pygame 中好好玩玩精灵,滚雪球学 Python 游戏番
  17. linux 免费 版本,五个免费的轻量级Linux发行版
  18. Centos安装rebar3
  19. 6款程序员常用代码对比工具,你用过几款?
  20. 2014全国计算机等级考试大纲,2014全国计算机等级考试大纲级.doc

热门文章

  1. IIS配置不正确可能导致“远程服务器返回错误: (404) 未找到错误一例。
  2. MySql技巧个人笔记
  3. Oracle 删除归档日志脚本
  4. 计算机网络技术与应用教程期末考试,2011大学计算机网络技术与应用教程客观题期末复习(含判断题,属于公共课程,使用)...
  5. wine安装lingoes
  6. Access restrictions on Jars
  7. leetcode算法题--数字序列中某一位的数字
  8. 2019全新学习路线图发布
  9. 进阶第四课 Python模块之os
  10. Linux - Nginx安装