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

Android: Adding button to tableViewRow prevents row touch events

    Details

      Description

      Adding button object to tableViewRow prevents tableViewRow Object touch or click events.

      Steps to reproduce:
      1: Use the below mentioned code in a alloy project.
      *index.js*

      function doClick(e) {  
          alert($.tableView);
      }
       
      function doClick1(e) {  
          alert("$.tableView");
      }
      $.index.open();
      

      *index.xml*

      <Alloy>
      	<Window class="container">
      		<TableView id="label" onClick="doClick">Hello, World
      			<TableViewRow id='row' class='row' className= 'categoryRow' width='Ti.UI.FILL'>
                      <Label id="categoryName" width = '150' text="touch test" left = '150' touchEnabled="false"/>
                      <Button id="categoryCount" onClick="doClick1" right = '225' width="40" height="50" backgroundColor="red" touchEnabled="false"/>
                      <ImageView id="rightImage" height='Ti.UI.SIZE' width='Ti.UI.SIZE' image='/appicon.png' right='0' touchEnabled="false"/>
              </TableViewRow>
      		</TableView>
      	</Window>
      </Alloy>
      

      *index.tss*

      ".container": {
      	backgroundColor: "white"
      },
      "Label": {
      	width: Ti.UI.SIZE,
      	height: Ti.UI.SIZE,
      	color: "#000"
      },
      "#row":{
      	backgroundColor: 'white',
      	height: 150,
      	backgroundSelectedColor: 'red'
      }
      

      2: Test the app in any android device, preferred is android version 4.1.2 device.
      3: tapping on tableView row does not change the selectedBackgroundColor.

      *now change the Button to View in index.xml*
      and repeat the steps, everything works fine.

        Attachments

          Activity

            People

            • Assignee:
              pwang Ping Wang
              Reporter:
              anigam Ashish Nigam
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-17156
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code