Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23407] Android: TableViewRow event listener postlayout is never called

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2016-05-26T23:00:53.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.0.0
ComponentsAndroid
Labelsandroid, automated
ReporterAnna
AssigneeAshraf Abu
Created2016-05-16T13:54:39.000+0000
Updated2017-10-18T21:38:27.000+0000

Description

TableViewRow 'postlayout' event is never called.
$.row.addEventListener('postlayout', function(e){
	Ti.API.info("-- postlayout event");
});

Comments

  1. Nazmus Salahin 2016-05-17

    Hello [~amurcia], Thanks for reporting. Your contribution is appreciated. If you can provide us full test code that reproduces the issue then it will be convenient for us to identify if it is a bug or implementation error. Thanks in advance
  2. Nazmus Salahin 2016-05-18

    Hello, I have also found that TableViewRow event listener postlayout is never fired. *Steps:* 1. Create a classic project for Android with following code.
       Titanium.UI.setBackgroundColor('#000');
       var tableData = [];
       var win= Titanium.UI.createWindow({  
           title:'Tab 1',
           backgroundColor:'#fff'
       });
       var table = Ti.UI.createTableView({ objName: 'table' });
       var row = Titanium.UI.createTableViewRow();
       
       var view = Titanium.UI.createView({
         backgroundColor:'red',
         width: 20, height: 20
       });
       
       row.addEventListener('postlayout', function(e){
       
       	Ti.API.info("-- postlayout event");
       
       });
       
       row.add(view);
       tableData.push(row);
       table.setData(tableData);
       
       win.add(table);
       
       win.open();
       
    2. Build and run the app. 3. Make the screen rotate. >> postlayout event is not fired and log is not produced. Thanks *Environment*: *Device info:* Nexus7 (android 6.0.1) *Node.js Version:* 0.12.7 *npm Version:* 2.11.3 *Titanium SDKs:* 5.2.2.GA and 5.2.1.GA *Java Development Kit Version:* 1.8.0_73 *Titanium CLI Version:* 5.0.5 *Appcelerator CLI Version:* 5.2.2 *Appcelerator Studio:* 4.5.0
  3. Anna 2016-05-24

    Please, I need a solution for this.
  4. Lokesh Choudhary 2016-08-19

    Verified the fix. The postlayout event gets fired successfully. Closing. Environment: Appc Studio : 4.7.1.201608190732 Ti SDK : 6.0.0.v20160819105028 Ti CLI : 5.0.9 Alloy : 1.9.1 MAC El Capitan : 10.11.6 Appc NPM : 4.2.7 Appc CLI : 6.0.0-24 Node: 4.4.4 Nexus 6 - Android 6.0.1

JSON Source