Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-26990

Android: Add tabMode (fixed, scrollabl) to TabGroup

    Details

    • Type: New Feature
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Adding the possibility to change the tabMode of a TabGroup. Currently it will default to a fixed mode (showing all tabs but cutting of labels to do so).

      The PR will add a scrollable tabMode (https://developer.android.com/reference/android/support/design/widget/TabLayout#mode_scrollable)

      var win = Ti.UI.createWindow({
       
      });
      var btn1 = Ti.UI.createButton({
      	title: "fixed",
      	top: 5
      });
      var btn2 = Ti.UI.createButton({
      	title: "scrollable",
      	top: 60
      });
      win.add([btn1, btn2]);
      btn1.addEventListener("click", function() {
      	openTabGroup(Ti.UI.Android.TAB_MODE_FIXED);
      })
      btn2.addEventListener("click", function() {
      	openTabGroup(Ti.UI.Android.TAB_MODE_SCROLLABLE);
      })
      win.open();
       
      function openTabGroup(tabModeValue) {
       
      	var tabs = [];
       
      	for (var i = 0; i < 10; ++i) {
      		var w = Ti.UI.createWindow({});
      		var t = Ti.UI.createTab({
      			window: w,
      			title: 'win'
      		});
      		tabs.push(t);
      	}
       
      	tabGroup = Ti.UI.createTabGroup({
      		tabs: tabs,
      		tabMode: tabModeValue
      	});
      	tabGroup.open();
      }
      

        Attachments

          Activity

            People

            • Assignee:
              emerriman Eric Merriman
              Reporter:
              michael Michael Gangolf
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration