The Code should be relatively simple. If the source file is downloaded, it will be easier to understand. It seems too cumbersome to paste the Code. For this reason, I made the following picture, which is actually an additional version of the first simple figure: ViewPager is used because I saw this article in the official Tutorial: using ViewPager for Screen Slides, which also provides the download routine, combined to understand the entire process. The running process is implemented as follows: MainActivity. When the screen is initialized and displayed, onCreate () is called (callback is used here to avoid creation of objects in the memory, however, painting is not performed when the screen is not displayed, which can save the system cost.) initialize ViewPager in onCreate (), give the object CalendarPagerAdapter for page frame management, and set the page number to be displayed at the beginning. For the current page number, ViewPager requests the Fragment of two adjacent pages to the CalendarPagerAdapter and creates three Frame Objects. If you use debugging for tracking, you will find that, although I have created three frames of objects, only one onCreateView () method is called, because the other two frames do not need to be drawn on the screen. When a frame is to be displayed on the screen, the onCreateView () method of the CalendarPagerFrament class is called back. In the onCreateView () method, the getView method of the CalendarTableCellProvider class is called, it is called repeatedly in a loop until all cells are created throughout the month. How to Create Layout: the XML file of Layout is explicitly loaded in the Code. For the Activity class, it is the statement setContentView (R. layout. activity_main); To load. In the other two places, the inflater statement is used. inflate (R. layout. view_calendar_table, container, false); to load. Window style: In MainActivity, there is a requestWindowFeature (Window. FEATURE_NO_TITLE). In fact, you can set the theme of the Activity and select a topic of NoActionBar. You can open the file AndroidManifest. xml. The AboutActivity is set to the Dialog topic style, so no title bar is displayed. BTW. At the same time, AboutActivity does not need menus, So I deleted the menu XML file automatically generated by IDE and the menu event handler function in the code. The explanation of the Code is over. If you have any questions, you can submit the comments.