These two weeks I mainly adding boxes to dashboard. Through realize a custom Loader(DashboardBoxDataLoader) and then return the data every box needed directly. Adding DashboardBoxFragment to dashboard. Also modify the layout of dashboard in vertical and horizon direction. The vertical and horizon display as followed:
While fix PossibleCursorLeak exception in the state of onPause in fragment or activity, if not shut down cursor, and refresh the local database now, it may cause PossibleCursorLeak. So I invoke restartLoader in onResume, and invoke destroyLoader in onPause to fix this BUG.
Added DashboardMostUtilizedFragment for displaying Most Utilized VMs and Most Utilized Hosts, and make Most Utilized VMs and Most Utilized Hosts show up only on the tablet(> = 7 inches) , make dashboard display in different ways on phone and tablet. The screenshot below is on phone:
The screenshot below is on tablet:
“Add boxes with’1 Data Centers’ ‘5 Clusters’ etc to dashboard” , I consider using the Loader, GridView and ListAdapter to achieve before, but found that it would use a lot of Loader, so I’m considering using custom loader get the data needed for each box.
The custom loader(DashboardBoxDataLoader) has been achieved, and I’m optimizing the dashboard boxes’ layout.