Tuesday, 2 August 2011

Opening an Activity with string in Android

  1. try {  
  2.   String className = 'com.almondmendoza.library.openActivity';  
  3.   Intent openNewIntent = new Intent( this, Class.forName( className ) );  
  4.   startActivity(  openNewIntent );  
  5. catch (ClassNotFoundException e) {  
  6.   e.printStackTrace();    

No comments:

Post a Comment