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

Android: Create View from template in Java

    Details

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

      Titanium 3.3.0 master

      Description

      The idea was for this example to work

      var win = Ti.UI.createWindow({
      	backgroundColor : 'white',
      	orientationModes : [Ti.UI.UPSIDE_PORTRAIT, Ti.UI.PORTRAIT, Ti.UI.LANDSCAPE_RIGHT, Ti.UI.LANDSCAPE_LEFT]
      });
      var btnHolder = Ti.UI.createView({
      	left: 0,
      	layout: 'vertical',
      	height: Ti.UI.SIZE,
      	width: Ti.UI.SIZE,
      	backgroundColor: 'green'
      });
      btnHolder.add([
      	{type:'Ti.UI.Button', left:0, bid:0,title: 'start'},
      	{type:'Ti.UI.Button', right:0, bid:1,title: 'pause'},
      	{type:'Ti.UI.Button', left:0, bid:2,title: 'resume'},
      	{type:'Ti.UI.Button', right:0, bid:3,title: 'playpause'},
      	{type:'Ti.UI.Button', left:0, bid:4,title: 'stop'},
      	{type:'Ti.UI.Button', right:0, bid:5,title: 'reverse'},
      	{type:'Ti.UI.Button', left:0, bid:6,title: 'autoreverse'},
      	{type:'Ti.UI.Button', right:0, bid:7,title: 'transition'}
      ]);
      btnHolder.addEventListener('singletap', function(e) {
      	Ti.API.info(JSON.stringify(e));
      	alert("we tapped on the button with bid: " + e.source.bid);
      });
      win.add(btnHolder);
      win.open();
      

      But it will also have great consequences, like being an almost direct fix for this one

      PR

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              farfromrefuge Martin Guillon (Inactive)
            • 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