Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5170] Android: Ti.UI.ScrollableView showPagingControl sould be false by default

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2012-01-04T15:39:19.000+0000
Affected Version/sRelease 1.7.2
Fix Version/sSprint 2011-48, Release 1.8.0.1
ComponentsAndroid
Labelsmerged-v8, module_scrollableview, parity, qe-testadded, stage
ReporterOpie Cyrus
AssigneeBill Dawson
Created2011-08-29T21:21:41.000+0000
Updated2014-02-24T19:48:39.000+0000

Description

showPagingControl should be false by default to achieve parity with iOS

Attachments

FileDateSize
app.js2011-09-06T11:16:20.000+00001000

Comments

  1. Josh Roesslein 2011-09-06

    Added a function test
  2. Bill Dawson 2011-09-27

    cf resolved via the totally new ScrollableView, TIMOB-5169
  3. Bill Dawson 2011-10-06

    Reopening because reports "undefined" if checked, instead of false. Behavior is still as if it was false, but property check shows undefined.
  4. Bill Dawson 2011-11-28

    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's showPagingControl property, *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();
       
  5. Natalie Huynh 2011-12-06

    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)
  6. Natalie Huynh 2011-12-06

    open to add label
  7. Wilson Luu 2012-01-04

    adding tag
  8. jithinpv 2013-11-10

    Anvil test case added. https://github.com/appcelerator/titanium_mobile/pull/4943

JSON Source