Intent中Bundle传递数据

Intent intent = new Intent(MyApplication.getContext(), WebViewActivity.class);
                Bundle b = new Bundle();
                b.putString(WebViewActivity.NEW, "news");
                intent.putExtras(b);
                startActivity(intent);
public static void startActivityNoFinish(Activity activity, Class cls, Bundle bundle, int requestCode) {
        Intent intent = new Intent(activity, cls);
        if (null != bundle) intent.putExtras(bundle);
        activity.startActivityForResult(intent, requestCode);
             
 activity.overridePendingTransition(android.R.anim.slide_in_left,android.R.anim.slide_out_right);
        activity.overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);
    }

 

你可能感兴趣的:(Intent中Bundle传递数据)