Advertisement
cyter

UpdatesForMainActivity

May 21st, 2015
568
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.88 KB | None | 0 0
  1. ...
  2. // Add Drawer Item to dataList
  3.             dataList.add(new DrawerItem(true)); // adding a spinner to the list
  4.  
  5.             dataList.add(new DrawerItem("My Favorites")); // adding a header to the list
  6.             dataList.add(new DrawerItem("Message", R.drawable.ic_action_email));
  7.             dataList.add(new DrawerItem("Likes", R.drawable.ic_action_good));
  8.             dataList.add(new DrawerItem("Games", R.drawable.ic_action_gamepad));
  9.             dataList.add(new DrawerItem("Lables", R.drawable.ic_action_labels));
  10.  
  11.              dataList.add(new DrawerItem("Main Options"));// adding a header to the list
  12.             dataList.add(new DrawerItem("Search", R.drawable.ic_action_search));
  13.             dataList.add(new DrawerItem("Cloud", R.drawable.ic_action_cloud));
  14.             dataList.add(new DrawerItem("Camara", R.drawable.ic_action_camera));
  15.             dataList.add(new DrawerItem("Video", R.drawable.ic_action_video));
  16.             dataList.add(new DrawerItem("Groups", R.drawable.ic_action_group));
  17.             dataList.add(new DrawerItem("Import & Export",
  18.                         R.drawable.ic_action_import_export));
  19.  
  20.              dataList.add(new DrawerItem("Other Option")); // adding a header to the list
  21.             dataList.add(new DrawerItem("About", R.drawable.ic_action_about));
  22.             dataList.add(new DrawerItem("Settings", R.drawable.ic_action_settings));
  23.             dataList.add(new DrawerItem("Help", R.drawable.ic_action_help));
  24. ...
  25.             if (savedInstanceState == null) {
  26.  
  27.                   if (dataList.get(0).isSpinner()
  28.                               & dataList.get(1).getTitle() != null) {
  29.                         SelectItem(2);
  30.                   } else if (dataList.get(0).getTitle() != null) {
  31.                         SelectItem(1);
  32.                   } else {
  33.                         SelectItem(0);
  34.                   }
  35.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement