DevStore首页 > DEV资源 > 源码下载 > 源码详情

Android动画合集大全(上百种动画)

 
zhengjiajian | 2015-05-13 18:06    浏览量(11819)    评论(35)    收藏(106)
功能分类:特效 支持平台:Android 运行环境:Eclipse
开发语言:Java 开发工具:Eclipse 源码大小:19.33MB
下载源码 2479 人下载

源码简介

本项目是一套基于安卓的动画集合大全项目源码,包括但不限于各种程序Splash启动引导动画、高仿动画效果、ListView集合、自定义控件集合、页面滑动集合、折叠效果集合和一些比较精彩的动画例如:淘宝菜单、火车票出票动画、优酷导航菜单、图片3D浏览、扫雷效果和其他简单复杂动画,总共可以达到上百个,还在不断更新。再加上本人平时收集的源码demo库可以说是很强大的存在了项目源码下载地址和本人收集的源码库。小编注:据说有广告,请谨慎下载哦!

源码截图

  • 运行截图
  • 运行截图
  • 运行截图
  • 运行截图
  • 运行截图
  • 运行截图
  • 运行截图
  • 运行截图
  • 运行截图
DevStore所有源码来自用户上传分享,版权问题及牵扯到商业纠纷均与DevStore无关。

源码片段

package com.duguang.baseanimation.ui;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.TextView;

import com.duguang.baseanimation.ContantValue;
import com.duguang.baseanimation.R;
import com.duguang.baseanimation.ui.base.BaseActivity;
import com.duguang.baseanimation.ui.customview.CustomViewMainActivity;
import com.duguang.baseanimation.ui.flip.FlipMainActivity;
import com.duguang.baseanimation.ui.imitate.ImitateMainActivity;
import com.duguang.baseanimation.ui.listivew.ListViewMani;
import com.duguang.baseanimation.ui.listivew.refresh.RefreshMainActivity;
import com.duguang.baseanimation.ui.nineold.NineOldMani;
import com.duguang.baseanimation.ui.property.PropertyAnimationActivity;
import com.duguang.baseanimation.ui.splash.SplashMainActivity;
import com.duguang.baseanimation.ui.tab.TabMainActivity;
import com.duguang.baseanimation.utils.ExampleUtil;
import com.umeng.fb.FeedbackAgent;
import com.umeng.socialize.bean.LIKESTATUS;
import com.umeng.socialize.bean.SocializeEntity;
import com.umeng.socialize.controller.RequestType;
import com.umeng.socialize.controller.UMServiceFactory;
import com.umeng.socialize.controller.UMSocialService;
import com.umeng.socialize.controller.listener.SocializeListeners.SocializeClientListener;
import com.umeng.socialize.view.ActionBarView;
import com.umeng.update.UmengUpdateAgent;
import com.zdp.aseo.content.AseoZdpAseo;

/**
 * 主页面 继承BaseActivity获取ActionBar
 * 
 * @author duguang 博客地址:http://blog.csdn.net/duguang77
 */
public class MainActivity extends BaseActivity implements OnItemClickListener {

	private static final String tag = "MainActivity";
	private ListView listView_animation;
	private ArrayAdapter itemAdapter;
	private TextView tvHint;



	@Override
	public void setView() {
		FeedbackAgent agent = new FeedbackAgent(this);
		agent.sync();
		UmengUpdateAgent.update(this);// 友盟更新
		UmengUpdateAgent.setUpdateOnlyWifi(false);// 在非Wifi情况下也检测版本更新
		getWindow().requestFeature(Window.FEATURE_PROGRESS); // 去标题栏
		setContentView(R.layout.activity_splash);
		init();
		registerMessageReceiver(); // used for receive msg
		AseoZdpAseo.init(this, AseoZdpAseo.INSERT_TYPE);
	}

	private void init() {

		UMSocialService controller = UMServiceFactory.getUMSocialService(
				"com.umeng.like", RequestType.SOCIAL);
		controller.getEntity().getLikeStatus();
		controller.likeChange(this, new SocializeClientListener() {
			@Override
			public void onStart() {
			}

			@Override
			public void onComplete(int status, SocializeEntity entity) {
				if (entity != null) {
					// 获取当前的“喜欢”状态
					LIKESTATUS likeStatus = entity.getLikeStatus();
				}
			}

		});
		AseoZdpAseo.initTimer(this);
		// 用于集成ActionBar 的ViewGroup ActionBar 将填充提供的ViewGroup(需要开发者自己在布局文件或代码中创建
		// ,建议使用RelativeLayout)
		RelativeLayout parent = (RelativeLayout) findViewById(R.id.RelativeLayout);
		// 创建ActionBar des参数是ActionBar的唯一标识,请确保不为空
		ActionBarView socializeActionBar = new ActionBarView(this, "111");

		LayoutParams layoutParams = new RelativeLayout.LayoutParams(
				LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
		socializeActionBar.setLayoutParams(layoutParams);
		// 添加ActionBar
		parent.addView(socializeActionBar);
	}

	@Override
	public void initView() {
		listView_animation = (ListView) findViewById(R.id.listView_animation);
		tvHint = (TextView) findViewById(R.id.tv_hint);
		itemAdapter = new ArrayAdapter(this,
				android.R.layout.simple_list_item_1, ContantValue.mainItem);

		Animation ani = new AlphaAnimation(0f, 1f);
		ani.setDuration(1500);
		ani.setRepeatMode(Animation.REVERSE);
		ani.setRepeatCount(Animation.INFINITE);
		tvHint.startAnimation(ani);
	}

	@Override
	public void setListener() {
		listView_animation.setAdapter(itemAdapter);
		listView_animation.setOnItemClickListener(this);
	}

	@Override
	public void onItemClick(AdapterView parent, View view, int position,
			long id) {
		Log.i(tag, String.valueOf(position));
		// Animation anim = AnimationUtils.loadAnimation(MainActivity.this,
		// R.anim.out_translate_top);
		// listView_animation.startAnimation(anim);

		Intent intent = null;
		switch (position) {
		case 0:
			startIntent(SimpleActivity.class);
			overridePendingTransition(R.anim.in_translate_top,
					R.anim.out_translate_top);
			break;
		case 1:
			startIntent(ComplexActivity.class);
			overridePendingTransition(R.anim.block_move_right,
					R.anim.small_2_big);
			break;
		case 2:
			startIntent(SplashMainActivity.class);
			overridePendingTransition(R.anim.small_2_big,
					R.anim.block_move_right);
			break;
		case 3:
			startIntent(FlipMainActivity.class);
			overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);
			break;
		case 4:
			startIntent(NineOldMani.class);
			overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);
			break;
		case 5:
			startIntent(PropertyAnimationActivity.class);
			overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);
			break;
		case 6:
			startIntent(ImitateMainActivity.class);
			overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);
			break;
		case 7:
			startIntent(ListViewMani.class);
			overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);
			break;
		case 8:
			startIntent(CustomViewMainActivity.class);
			overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);
			break;
		case 9:
			startIntent(TabMainActivity.class);
			overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);
			break;
		default:
			break;
		}

	}
	
	/**
	 * 切换Activity
	 * @param class1
	 */
	public void startIntent(Class class1){
		Intent intent = new Intent(MainActivity.this,class1);
		startActivity(intent);
	}
	
	@Override
	public void onBackPressed() 
	{
		Intent intent = new Intent(Intent.ACTION_MAIN);
		intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
		intent.addCategory(Intent.CATEGORY_HOME);
		startActivity(intent);
	}

	// for receive customer msg from jpush server
	private MessageReceiver mMessageReceiver;
	public static final String MESSAGE_RECEIVED_ACTION = "com.example.jpushdemo.MESSAGE_RECEIVED_ACTION";
	public static final String KEY_TITLE = "title";
	public static final String KEY_MESSAGE = "message";
	public static final String KEY_EXTRAS = "extras";
	public static boolean isForeground = false;

	public void registerMessageReceiver() {
		mMessageReceiver = new MessageReceiver();
		IntentFilter filter = new IntentFilter();
		filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
		filter.addAction(MESSAGE_RECEIVED_ACTION);
		registerReceiver(mMessageReceiver, filter);
	}

	public class MessageReceiver extends BroadcastReceiver {

		@Override
		public void onReceive(Context context, Intent intent) {
			if (MESSAGE_RECEIVED_ACTION.equals(intent.getAction())) {
				String messge = intent.getStringExtra(KEY_MESSAGE);
				String extras = intent.getStringExtra(KEY_EXTRAS);
				StringBuilder showMsg = new StringBuilder();
				showMsg.append(KEY_MESSAGE + " : " + messge + "\n");
				if (!ExampleUtil.isEmpty(extras)) {
					showMsg.append(KEY_EXTRAS + " : " + extras + "\n");
				}
			}
		}
	}

	@Override
	protected void onResume() {
		isForeground = true;
		super.onResume();
	}

	@Override
	protected void onPause() {
		isForeground = false;
		super.onPause();
	}

	@Override
	protected void onDestroy() {
		unregisterReceiver(mMessageReceiver);
		super.onDestroy();
	}

}
  •   赞(15) 赞 +1 赞(15) 已赞
  •   收藏(106) 收藏 +1 已收藏 取消
  •   下载(2479)
评论(35)
123de

123de 2016-03-02 13:08:17

广告太多
回复(0) 赞(0) 赞(1)
xuyingnan

xuyingnan 2015-11-17 17:35:50

广告太多,不是真心分享东西的
回复(0) 赞(0) 赞(1)
dreamseekerkun

dreamseekerkun 2015-09-24 19:29:49

广告不是一般的多啊,严重影响使用啊,可以加广告,但也太多了吧,点一个动画,就跳出广告来
。。。。。。。。。。。。。。。。。。。。
回复(0) 赞(0) 赞(1)
Deson

Deson 2015-09-16 14:45:24

广告太多,不是真心分享东西的
回复(0) 赞(0) 赞(1)
B笨

B笨 2015-08-31 11:58:42

很不错的动画合集内容
回复(0) 赞(0) 赞(1)
  • 推荐
  • 审核
  • 收录
  • 获取活力值

源码上传作者

  • 122 能力值
  • 59 源码
  • 0 评测
  • 0 资料

热门源码