You need to write a page with the top unchanged and the following tabs, the content displayed in the middle can be changed, and the ActivityGroup is used for implementation. The jump between pages in the middle is implemented using the following statement: container. removeAllViews ();
Intent intent = new Intent (Player. this, PlayerAlbum. class );
Intent. addFlags (Intent. FLAG_ACTIVITY_CLEAR_TOP );
Window subActivity = (ActivityGroup) GinwavePlayer. this. getParent (). getLocalActivityManager (). startActivity ("", intent );
Container. addView (subActivity. getDecorView ());,
Because different la s need to be displayed on the horizontal and vertical screens (the content displayed on the horizontal screen is a Gallery for Image Browsing), You can reset the layout in the onConfigurationChanged function, when the portrait screen is displayed, the page Jump is normal, from the portrait screen to the landscape screen, and then to the portrait screen, the page cannot jump over (from Player to PlayerAlbum page ), after logging, I found that the PlayerAlbum constructor has been executed, but the Player page is still displayed. I asked a question on csdn and no one gave an answer, maybe I asked too late. I thought about why the jump was normal during the Portrait last night, but it changed from the portrait screen to the landscape screen, the jump cannot be performed after the screen is changed to portrait. I think it may be because the only String ID is not specified for the above startActivity. Then I add a unique String ID to it, but there is still a problem, then I think it may be because the Activity record in ActivityGroup is incorrect, and I added it before subActivity (ActivityGro Up) PlayList. this. getParent (). getLocalActivityManager (). removeAllActivities () function, and then the switchover is normal. The understanding of ActivityGroup is still problematic. Let's take a look at it later ~~
From the column xiaoxiaobian3310903