模块内正常跳转
显式跳转
Intent intent = new Intent();
intent.setClass(this, xxxrActivity.class);
intent.putExtra("key","value");
startActivity(intent);
模块间跳转
隐式跳转
1:根据具体activity路径跳转
Intent intent = new Intent();
intent.setClassName(getPackageName(), "com.xxx_xxxActivity");
intent.putExtra("key", "value");
if (getPackageManager().resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY)!= null){
startActivity(intent);
}else {
Toast.makeText(this,"找不到你想要的activity",Toast.LENGTH_SHORT).show();
}
2:根据activity配置的action跳转
//配置action
<activity android:name="com.xxx.xxxActivity" >
<intent-f