接收方:
Intent intent = getIntent();
Bundle b = intent.getExtras();
if(b.containsKey("entries")) {
    mImageList = (ArrayList) b.getSerializable("entries");
}
else if(b.containsKey("favorites")) {
    mFavoriteList = (ArrayList) b.getSerializable("favorites");
    btnFavorite.setImageResource(R.drawable.icon_delete);        }
tag_index = intent.getIntExtra("tag", 0);
mPosition = intent.getIntExtra("position", 0);
mViewPager.setCurrentItem(mPosition, false);


传递方:
Intent intent = new Intent();
Bundle b = new Bundle();
b.putInt("position", position);
b.putSerializable("entries", indexes);
b.putInt("tag", tag);
intent.putExtras(b);
intent.setClass(context, ImageTouchActivity.class);
context.startActivity(intent);

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. TextView 不用 ScrollViewe 也可以滚动
  2. Android构建音频播放器教程(四)
  3. 在Android(安卓)Studio中使用Android(安
  4. android学习之textView布局文件
  5. Android(安卓)WebView学习
  6. EditText 总是被软键盘遮挡
  7. Android(安卓)总结1
  8. android2.x中android:layout_marginRight
  9. android Installation error: INSTALL_FA
  10. android app content