095 private void openRightWindow(String Id, int which){
096 if (which != currentPage) {
097 currentPage = which;
098 Intent intent = new Intent();
099 switch (which) {
100 case 1:
101 intent.setClass(this, SecondActivity.class);
102 break;
103
104 case 2:
105 intent.setClass(this, ThirdActivity.class);
106 break;
107 }
108 View view = null;
109 Window window = getLocalActivityManager().startActivity(Id, intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));
110 if (window != null)
111 {
112 view = window.getDecorView();
113 }
114 mContentView.removeAllViews();
115 mContentView.addView(view, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT));
116 }
117