Advertisement
Guest User

Untitled

a guest
Jul 25th, 2014
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1.   public void getTutorialByID(View v)
  2.     {
  3.         Button cbPressed = (Button)v;
  4.         open(GetTutorialActivity.class, cbPressed.getText().toString());
  5.     }
  6.  
  7.     private <T extends Activity> void open(Class<T> activity, String cbPressedText)
  8.     {
  9.         Intent intentActivity = new Intent(this, activity);
  10.         intentActivity.setAction(cbPressedText);
  11.         startActivity(intentActivity);
  12.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement