[TIMOB-5170] Android: Ti.UI.ScrollableView showPagingControl sould be false by default
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2012-01-04T15:39:19.000+0000 |
| Affected Version/s | Release 1.7.2 |
| Fix Version/s | Sprint 2011-48, Release 1.8.0.1 |
| Components | Android |
| Labels | merged-v8, module_scrollableview, parity, qe-testadded, stage |
| Reporter | Opie Cyrus |
| Assignee | Bill Dawson |
| Created | 2011-08-29T21:21:41.000+0000 |
| Updated | 2014-02-24T19:48:39.000+0000 |
Description
showPagingControl should be false by default to achieve parity with iOS
Attachments
| File | Date | Size |
|---|---|---|
| app.js | 2011-09-06T11:16:20.000+0000 | 1000 |
Added a function test
cf resolved via the totally new ScrollableView, TIMOB-5169
Reopening because reports "undefined" if checked, instead of false. Behavior is still as if it was false, but property check shows undefined.
Testing Notes
* Use the app.js below and create an app and run it. * When the app loads, it should say "value: false" at the bottom right. This is reading the scrollable view'sshowPagingControlproperty, *without* that property having been set. The important thing is that it says "false" instead of "undefined". * Play with the checkbox and make sure it works as expected. * Please **also test the scrollable view in Kitchen Sink**, under Base UI - Views - Scroll Views - Scrollable View.var win = Ti.UI.createWindow({backgroundColor:'#444', exitOnClose: true}); var views = []; function makeView(color) { return Ti.UI.createView({ right: 0, left: 0, top: 0, bottom: 0, backgroundColor: color }); } views.push(makeView("red")); views.push(makeView("green")); views.push(makeView("blue")); var scrollableView = Ti.UI.createScrollableView({ bottom: "50dp", left: "10dp", right: "10dp", top: "50dp", views: views }); win.add(scrollableView); // Switch to toggle the showPagingControl property on the scrollable view. var showControlSwitch = Ti.UI.createSwitch({ value: scrollableView.showPagingControl, style: Ti.UI.Android.SWITCH_STYLE_CHECKBOX, title: "showPagingControl?", bottom: "5dp", height: "40dp", left: "10dp", width: "150dp" }); win.add(showControlSwitch); // Displays current value of showPagingControl property. // This should default to false. var showControlProperty = Ti.UI.createLabel({ left: "160dp", text: "value: " + scrollableView.showPagingControl, bottom: "5dp", height: "40dp", right: "5dp" }); win.add(showControlProperty); showControlSwitch.addEventListener('change', function (e) { scrollableView.showPagingControl = e.value; showControlProperty.text = 'value: ' + scrollableView.showPagingControl; }); win.open();Tested with 1.8.0.1.v20111205164258 v8/rhino on Galaxy 10.1 (3.1) Droid 1 (2.2.2) Nexus S (2.3.6) Emulator (4.0)
open to add label
adding tag
Anvil test case added. https://github.com/appcelerator/titanium_mobile/pull/4943