界面A

private static  final int REQUEST_REGION_PICK=1;//定义返回页面标识

1.开始发送请求:

     Intent intent = new Intent(A.this, B.class);
     startActivityForResult(intent, REQUEST_REGION_PICK);

2.接收B页面数据:

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {    
    super.onActivityResult(requestCode, resultCode, data);


if (requestCode == REQUEST_REGION_PICK) {
if (data != null) {

String date= data.getStringExtra("date");
}
}

    }


界面B

Intent intent = new Intent();
intent.putExtra("
date", date);
setResult(Activity.RESULT_OK, intent); 

     Intent intent = new Intent(StoreService.this, F4_RegionPickActivity.class);
     startActivityForResult(intent, REQUEST_REGION_PICK);
     overridePendingTransition(R.anim.my_scale_action,R.anim.my_alpha_action);

更多相关文章

  1. android Fragment 懒加载布局
  2. android 跳转 activity 出现错误 you do not have permission。
  3. Android的路由框架用法
  4. Android 6.0以上权限拒绝打开权限设置界面
  5. Android的全局通知机制
  6. Android 微信分享,无需那么麻烦。
  7. Android底部tab与标题栏相结合
  8. Android的界面设计规范-1
  9. Android简单的使用listview动态生成不同页面

随机推荐

  1. 在Android Studio中使用cmake编译FFmpeg
  2. android uiautomator 截取图片
  3. android调用隐藏的网络信息设置菜单实现
  4. Android开发----自动化测试
  5. [Android 动画]简要分析一下Animator 与
  6. Android应用的自动升级、更新模块的实现
  7. Android 以webview的方式集成Dcloud h5+S
  8. Android开机启动shell脚本(Android 8.0测
  9. Google 发布 Android 版 Chrome 浏览器,只
  10. 一个简单的demo学习Android远程Service(AI