Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5290] Android - TableView & ListView height can't be Ti.UI.SIZE, always Ti.UI.FILL instead.

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionFixed
Resolution Date2017-11-02T20:32:29.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid, regression
ReporterClément Blanco
AssigneeShak Hossain
Created2017-10-17T16:50:59.000+0000
Updated2017-11-02T20:32:29.000+0000

Description

Experiencing this under Ti SDK 6.2.2.GA and Ti SDK 6.2.1.GA. Might be 6.2.0.GA+ related. The following samples will not set the height of the top parent element (<TableView> or <ListView>) to a Ti.UI.SIZE behaviour and instead it will use the Ti.UI.FILL one for Android.
<Alloy>
    <Window>
        <ListView height="Ti.UI.SIZE">
            <ListSection headerTitle="Fruit" height="Ti.UI.SIZE">
                <ListItem title="Apple" height="Ti.UI.SIZE" />
                <ListItem title="Bananas" height="Ti.UI.SIZE" />
            </ListSection>
            <ListSection headerTitle="Vegetables" height="Ti.UI.SIZE">
                <ListItem title="Carrots" height="Ti.UI.SIZE" />
                <ListItem title="Potatoes" height="Ti.UI.SIZE" />
            </ListSection>
            <ListSection headerTitle="Fish" height="Ti.UI.SIZE">
                <ListItem title="Cod" height="Ti.UI.SIZE" />
                <ListItem title="Haddock" height="Ti.UI.SIZE" />
            </ListSection>
        </ListView>
    </Window>
</Alloy>
<Alloy>
    <Window>
        <TableView height="Ti.UI.SIZE">
            <TableViewSection headerTitle="Fruit" height="Ti.UI.SIZE">
                <TableViewRow title="Apple" height="Ti.UI.SIZE" />
                <TableViewRow title="Bananas" height="Ti.UI.SIZE" />
            </TableViewSection>
            <TableViewSection headerTitle="Vegetables" height="Ti.UI.SIZE">
                <TableViewRow title="Carrots" height="Ti.UI.SIZE" />
                <TableViewRow title="Potatoes" height="Ti.UI.SIZE" />
            </TableViewSection>
            <TableViewSection headerTitle="Fish" height="Ti.UI.SIZE">
                <TableViewRow title="Cod" height="Ti.UI.SIZE" />
                <TableViewRow title="Haddock" height="Ti.UI.SIZE" />
            </TableViewSection>
        </TableView>
    </Window>
</Alloy>

Comments

  1. Hans Knöchel 2017-10-18

    Which SDK version do you use? Can you please try with 6.3.0 RC?
  2. Clément Blanco 2017-10-18

    Ti SDK 6.2.0.GA+ I suspect. Trying to compile with 6.3.0.v20171017063048 and I get:
       SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
           at exports.runInThisContext (vm.js:53:16)
           at Module._compile (module.js:373:25)
           at Object.Module._extensions..js (module.js:416:10)
           at Module.load (module.js:343:32)
           at Function.Module._load (module.js:300:12)
           at Module.require (module.js:353:17)
           at require (internal/module.js:12:17)
           at /Users/clement/Library/Application Support/Titanium/mobilesdk/osx/6.3.0.v20171017063048/node_modules/node-titanium-sdk/lib/titanium.js:97:14
           at /Users/clement/Library/Application Support/Titanium/mobilesdk/osx/6.3.0.v20171017063048/node_modules/node-titanium-sdk/node_modules/async/dist/async.js:3853:24
           at eachOfArrayLike (/Users/clement/Library/Application Support/Titanium/mobilesdk/osx/6.3.0.v20171017063048/node_modules/node-titanium-sdk/node_modules/async/dist/async.js:1003:9)
           at eachOf (/Users/clement/Library/Application Support/Titanium/mobilesdk/osx/6.3.0.v20171017063048/node_modules/node-titanium-sdk/node_modules/async/dist/async.js:1051:5)
           at _parallel (/Users/clement/Library/Application Support/Titanium/mobilesdk/osx/6.3.0.v20171017063048/node_modules/node-titanium-sdk/node_modules/async/dist/async.js:3852:5)
           at Object.parallelLimit [as parallel] (/Users/clement/Library/Application Support/Titanium/mobilesdk/osx/6.3.0.v20171017063048/node_modules/node-titanium-sdk/node_modules/async/dist/async.js:3935:5)
           at Object.exports.platformOptions (/Users/clement/Library/Application Support/Titanium/mobilesdk/osx/6.3.0.v20171017063048/node_modules/node-titanium-sdk/lib/titanium.js:81:8)
           at /Users/clement/Library/Application Support/Titanium/mobilesdk/osx/6.3.0.v20171017063048/cli/commands/build.js:49:7
           at /Users/clement/.appcelerator/install/6.2.4/package/node_modules/titanium/lib/hook.js:256:13
       ---------------------------------------------
           at Object.run (/Users/clement/.appcelerator/install/6.2.4/package/node_modules/titanium/node_modules/node-appc/lib/subprocess.js:59:8)
           at find (/Users/clement/.appcelerator/install/6.2.4/package/node_modules/titanium/node_modules/node-appc/lib/subprocess.js:96:14)
           at /Users/clement/.appcelerator/install/6.2.4/package/node_modules/titanium/node_modules/node-appc/node_modules/async/dist/async.js:3894:5
           at q.process (/Users/clement/.appcelerator/install/6.2.4/package/node_modules/titanium/node_modules/node-appc/node_modules/async/dist/async.js:2299:17)
           at Immediate.<anonymous> (/Users/clement/.appcelerator/install/6.2.4/package/node_modules/titanium/node_modules/node-appc/node_modules/async/dist/async.js:2112:16)
           at processImmediate [as _immediateCallback] (timers.js:383:17)
       ---------------------------------------------
           at /Users/clement/.appcelerator/install/6.2.4/package/node_modules/titanium/node_modules/node-appc/node_modules/async/dist/async.js:2111:9
           at apply (/Users/clement/.appcelerator/install/6.2.4/package/node_modules/titanium/node_modules/node-appc/node_modules/async/dist/async.js:21:25)
           at /Users/clement/.appcelerator/install/6.2.4/package/node_modules/titanium/node_modules/node-appc/node_modules/async/dist/async.js:56:12
           at _insert (/Users/clement/.appcelerator/install/6.2.4/package/node_modules/titanium/node_modules/node-appc/node_modules/async/dist/async.js:2220:9)
           at Object.q.push (/Users/clement/.appcelerator/install/6.2.4/package/node_modules/titanium/node_modules/node-appc/node_modules/async/dist/async.js:2267:13)
           at Object.findExecutable (/Users/clement/.appcelerator/install/6.2.4/package/node_modules/titanium/node_modules/node-appc/lib/subprocess.js:113:8)
           at resolveNode (/Users/clement/.appcelerator/install/6.2.4/package/node_modules/titanium/lib/titanium.js:97:34)
           at /Users/clement/.appcelerator/install/6.2.4/package/node_modules/titanium/lib/titanium.js:74:5
           at Object.<anonymous> (/Users/clement/.appcelerator/install/6.2.4/package/node_modules/titanium/lib/titanium.js:80:2)
       
  3. Hans Knöchel 2017-10-18

    [~clement] That was just fixed 5min ago :-), a new build will be online in a few minutes (try in ~ 20min).
  4. Clément Blanco 2017-10-19

    Ok 6.3.0.RC fixes this.

JSON Source