Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25667] Android: Add TableView "scrollable" property support

GitHub Issuen/a
TypeImprovement
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2018-05-09T22:39:51.000+0000
Affected Version/sn/a
Fix Version/sRelease 7.3.0
ComponentsAndroid
LabelsTableView, android, parity
ReporterJoshua Quick
AssigneeJoshua Quick
Created2018-01-13T02:37:31.000+0000
Updated2018-06-21T16:32:43.000+0000

Description

*Summary:* A TableView on iOS supports a "scrollable" property which can enable/disable touch scrolling by the end-user. We should add support on Android as well for parity. _(Note: Android ListViews already supports a similar feature.)_ *Test:*
var window = Ti.UI.createWindow();
var tableData = [];
for (var index = 1; index <= 100; index++) {
	var row = Ti.UI.createTableViewRow({ title: "Row " + index.toString() });
	tableData.push(row);
}
var tableView = Ti.UI.createTableView(
{
	data: tableData,
	scrollable: true,
});
window.add(tableView);
function createButtonText() {
	return tableView.scrollable ? "Disable Scrolling" : "Enable Scrolling";
}
var button = Ti.UI.createButton(
{
	title: createButtonText(),
	right: "5dp",
	bottom: "5dp",
});
button.addEventListener("click", function(e) {
	tableView.scrollable = !tableView.scrollable;
//	tableView.setScrollable(!tableView.getScrollable());
	button.title = createButtonText();
});
window.add(button);
window.open();

Comments

  1. Joshua Quick 2018-01-13

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/9728
  2. Joshua Quick 2018-02-15

    PR (7.1.x): https://github.com/appcelerator/titanium_mobile/pull/9836
  3. Lokesh Choudhary 2018-05-07

    7.1.X PR https://github.com/appcelerator/titanium_mobile/pull/9836 --- Closed.
  4. Lokesh Choudhary 2018-05-07

    FR Passed. Waiting for merger to be enabled.
  5. Lokesh Choudhary 2018-05-09

    PR Merged.
  6. Samir Mohammed 2018-06-21

    Closing ticket. Improvement can be seen in SDK Version: 7.3.0.v20180618182516 Test and other information can found at: https://github.com/appcelerator/titanium_mobile/pull/9728

JSON Source