Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

TouchenEnabled on TableView not working

$
0
0

I have a tableView that will open a new window when I click on one of the rows. Because this can be quite slow on some Android devices it is possible to click on the row twice before the new window opens which will result in the window open twice.

To prevent that I wanted to set the touchEnabled property on the tableView to false, once a click Event was received and I wanted to set it back to true when the window regains focus.

Because this didn't work I just set the touchEnabled to false on the tableView without ever setting it back to true, but despite the false the click event will be processed (I am logging the touchEnabled property).

Anyway, so here is how I set the property:

controller.categoryView.tableView.addEventListener('click', function(e) {
        Logger.info("CategoryView ID: " + e.rowData.id);
        controller.categoryView.tableView.touchEnabled = false;
        controller.loadSelection({
            categoryId : e.rowData.id,
            name : e.rowData.name
        });
    });
Does anyone know why the click keeps being processed? I'm using Mobile SDK 1.7.1

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>