Пример #1
0
 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.main);
   actionBar = getActionBar();
   actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
   actionBar.setDisplayShowTitleEnabled(false);
   initCartoDB();
   initTabs();
   initLocation();
 }
Пример #2
0
 private void initTabs() {
   listingListener =
       new TabListener<ListingListFragment>(this, "listinglist", ListingListFragment.class);
   ActionBar.Tab tab = actionBar.newTab().setText("Listings").setTabListener(listingListener);
   actionBar.addTab(tab);
   tab =
       actionBar
           .newTab()
           .setText("Requests")
           .setTabListener(
               new TabListener<RequestListFragment>(
                   this, "requestlist", RequestListFragment.class));
   actionBar.addTab(tab);
   myListingFrag = (ListingListFragment) listingListener.getFragment();
   myListingFrag.setClient(myClient);
 }