Answers for "Android java parse class name via intent"

0

Android java parse class name via intent

Intent p = new Intent(StartScreen.this, Setting.class);
p.putExtra("class","packagename.classname");
Posted by: Guest on July-22-2021
0

Android java parse class name via intent

Bundle extras = getIntent().getExtras();
String classname=extras.getString("class");
Class<?> clazz = Class.forName(classname);
Intent i = new Intent(Setting.this, clazz);
startActivity(i);
Posted by: Guest on July-22-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language