/** * 跳转到对应activity */ public void toActivity(Context context,String fullName) { if (className != null && className.length() > 0) { try { Intent intent = new Intent(context, Class.forName(fullName)); context.startActivity(intent); } catch (Exception e) { e.printStackTrace(); } } }
fullName为完整类名,如com.example.app.MyActivity