Skip to content Skip to sidebar Skip to footer

Android: Using An Intent To Start Any Activity

I have been working on an application that has a bunch of formulas in it. The user can select which formula they need to use, input the numbers/variables, and the program will retu

Solution 1:

Since Intent constuctor accepts the component class as its parameter, it's as simple as this:

context.startActivity(new Intent(context, Class.forName("com.example.area.Triangle_Area"));

Post a Comment for "Android: Using An Intent To Start Any Activity"