星空网 > 软件开发 > 操作系统

view爆炸效果

view爆炸效果images/loading.gif' data-original="http://images2015.cnblogs.com/blog/822717/201511/822717-20151118233658530-1831541658.gif" />

犹如天女散花一样,**散列,比较有趣。
Android ExplosionField在github上的项目主页是:https://github.com/tyrantgit/ExplosionField 

注意:jdk1.7

 1 package com.zzw.textexplosionfield; 2  3 import android.app.Activity; 4 import android.os.Bundle; 5 import android.view.View; 6 import android.widget.ImageView; 7 import tyrantgit.explosionfield.ExplosionField; 8  9 public class MainActivity extends Activity {10 11   private ExplosionField mExplosionField;12   private ImageView image;13 14   @Override15   protected void onCreate(Bundle savedInstanceState) {16     super.onCreate(savedInstanceState);17     setContentView(R.layout.activity_main);18 19     // 先初始化载入ExplosionField20     mExplosionField = ExplosionField.attach2Window(this);21 22     image = (ImageView) findViewById(R.id.image);23     image.setOnClickListener(new View.OnClickListener() {24       @Override25       public void onClick(View v) {26         // 开始执行动画...27         mExplosionField.explode(v);28 29         // ExplosionField.explode后,父布局中虽看不到ImageView,30         //但ImageView所占据的位置还会响应事件.31         // 如果想屏蔽此ImageView出现,则:32         image.setVisibility(View.GONE);33       }34     });35   }36 }

view爆炸效果view爆炸效果

 1 <RelativeLayout ="http://schemas.android.com/apk/res/android" 2   ="http://schemas.android.com/tools" 3   android:layout_width="match_parent" 4   android:layout_height="match_parent" 5   tools:context="com.zzw.textexplosionfield.MainActivity" > 6  7   <ImageView 8     android:id="@+id/image" 9     android:layout_width="wrap_content"10     android:layout_height="wrap_content"11     android:layout_centerInParent="true"12     android:src='/images/loading.gif' data-original="@drawable/ic_launcher" />13 14 </RelativeLayout>

View Code

 




原标题:view爆炸效果

关键词:ie

ie
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

麦鲁小城苏州攻略 麦鲁小城好玩吗:https://www.vstour.cn/a/396224.html
云南东川红土地旅游线路是什么?:https://www.vstour.cn/a/396225.html
从长沙火车站到省博物馆,橘子洲,坡子街怎么做公交:https://www.vstour.cn/a/396226.html
昆明中国国旅(打造一次完美的旅行体验):https://www.vstour.cn/a/396227.html
茂林风景区有什么景点:https://www.vstour.cn/a/396228.html
罗源湾海洋世界8个景点图 罗源湾海洋世界旅游攻略:https://www.vstour.cn/a/396229.html
天坛最佳攻略 天坛必玩景点:https://www.vstour.cn/a/408240.html
央视新址为什么会找回:https://www.vstour.cn/a/408241.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流