Guest User

Untitled

a guest
Aug 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. Change activity transition when inside a TabHost
  2. private Activity owner;
  3. public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
  4. Intent programActivity = new Intent().setClass(view.getContext(), ProgramActivity.class);
  5. Program program = (Program) parent.getItemAtPosition(position);
  6. programActivity.putExtra("programID", program.getId());
  7. owner.startActivity(programActivity);
  8. owner.overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
  9. }
Add Comment
Please, Sign In to add comment