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

Android: Inconsistent Sizing of Tabbed Window with Table and Textfield

    Details

      Description

      {html}<div><h1>Problem</h1>
      <p>The height of a table and a text field in a tabbed window is
      inconsistent when the keyboard pops up. Consider an app with two
      tabs, and the first tab has a table and a text field on it. Touch
      into the text field, and the keyboard pops up over the window. The
      layout of the current tab does not change at all. Switch to the
      second tab, and then back to the first tab, and everything will
      have resized to accomodate for the keyboard. This "resize" does not
      occur if the table is not added to the tab.</p>
      <h1>Expected Behavior</h1>
      <p>The tab should either resize or not. The presence of the table
      should not affect this.</p>
      <h1>Sample Code</h1>
      <p>Follow the instructions of the visible text – "Touch 1st", 2nd,
      and 3rd. After touching the 1st one, notice the keyboard pops up
      and the layout is NOT adjusted. Touch 2nd and 3rd, and now notice
      the tab has been scrunched up.</p>
      <pre>
      <code class=
      "javascript">// create our main window, which is a table with a text field
      var mainWindow = Titanium.UI.createWindow({
      backgroundColor:'yellow',
      title:'Touch Me 3rd'
      });

      // add a table view – note that if you comment out this line, the resize issue will disappear!
      mainWindow.add(Ti.UI.createTableView());

      // add a text field
      mainWindow.add(Titanium.UI.createTextField({
      width:300,
      height:50,
      value: 'Touch Me 1st',
      backgroundColor:'white'
      }));

      // add a footer view
      mainWindow.add(Ti.UI.createView({
      backgroundColor:'#3b5d7c',
      bottom: 0,
      height: 45
      }));

      // add our main window to a tab group
      var tabGroup = Titanium.UI.createTabGroup();
      tabGroup.addTab(Titanium.UI.createTab({
      window: mainWindow,
      title: 'Touch Me 3rd'
      }));
      tabGroup.addTab(Titanium.UI.createTab({
      window:Titanium.UI.createWindow({ backgroundColor: 'cyan', title: 'Touch Me 2nd' }),
      title: 'Touch Me 2nd'
      }));
      tabGroup.open();</code>
      </pre>
      <h1>Tested On</h1>
      <p>Titanium SDK version: 1.6.0 (02/10/11 14:34 9db0685...)<br>
      Android Epic 4G 2.1</p>
      <h2>Associated Helpdesk Ticket</h2>
      <p><a href=
      "http://developer.appcelerator.com/helpdesk/view/72891">http://developer.appcelerator.com/helpdesk/view/72891</a></p></div>{html}

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                billdawson Bill Dawson
                Reporter:
                dtoth Dawson Toth
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code