Details

      Description

      I found two issues with the latest ActionGroup code changes:

      1. Documentation: Ti.UI.TabGroup needs to reflect that you can get the "activity" property. I had to dig in the source to find out that TabGroupProxy extends WindowProxy under the covers to figure that out.

      2. "title" property for ActionBar does not do anything when the ActionBar is displayed with a TabGroup. Create a new project with the proper min-sdk setting, and use this code in app.js:

      var tabs = Ti.UI.createTabGroup();
       
      var win1 = Ti.UI.createWindow({
      	title:"Window 1",
      	backgroundColor:'#f00',
      });
      var tab1 = Ti.UI.createTab({
      	title:"Win 1",
      	window:win1,
      });
       
      tabs.addTab(tab1);
       
      var win2 = Ti.UI.createWindow({
      	title:"Window Dos",
      	backgroundColor:'#fff',
      });
      var tab2 = Ti.UI.createTab({
      	title:"Win 2",
      	window:win2,
      });
       
      tabs.addTab(tab2);
       
      tabs.addEventListener('focus', function(e) {
      	var actionBar = tabs.getActivity().actionBar; // "activity" is an undocumented Android property for TabGroup
      	if (actionBar) {
      		actionBar.setDisplayHomeAsUp(true); // works
      		actionBar.onHomeIconItemSelected = function() { // works
      			alert('actionBar hides for 5 seconds');
      			actionBar.hide(); // works
      			setTimeout(function(){
      				actionBar.show(); // works
      			},5000);
      		}
      //		actionBar.setTitle(e.tab.window.title); // title never appears
      		actionBar.setTitle('TEST'); // hard-coded text just to be sure
      	}
      });
       
      tabs.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ayeung Allen Yeung
                Reporter:
                iotashan Shannon Hicks
                Tester:
                Lokesh Choudhary
              • Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code