Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date Picker - Some devices(Galaxy S6) display calendar vs spinner and overlap buttons #17

Open
olearyj opened this issue Oct 13, 2016 · 1 comment

Comments

@olearyj
Copy link

olearyj commented Oct 13, 2016

On some devices the date picker displays a calendar instead of 3 spinners to select the date. This is OK on the Nexus 9 (probably because the screen is large because it's a tablet) but on the Galaxy S6 the calendar date picker overlaps the cancel and done buttons making it impossible to leave the date picker widget.

@olearyj
Copy link
Author

olearyj commented Oct 13, 2016

I made a few changes to fix this problem. You may want to implement these in the git repo.

Changes to the pickerView.tss in the android folder:

"#pickerView": {
  //top: '10%',
  width: '85%',
  height: Titanium.UI.SIZE,
  backgroundColor: 'white',
  borderColor: '#636363',
  borderWidth: 1,
  borderRadius: 1,
  zIndex: 99,
  layout: 'vertical'
}

"#picker": {
  top: '1%',
  selectionIndicator: true,
  useSpinner: true,
  visibleItems: 10,
  type: Ti.UI.PICKER_TYPE_PLAIN,
}

"#toolbar": {
  bottom: '1%',
  height: 50,
  backgroundColor: 'transparent',
  width: Ti.UI.FILL,
  layout: 'composite',
}

Changes in pickerView.xml:

<Alloy>
  <View id="pickerView">

    <Toolbar id="toolbar" platform="ios">
      <Items>
        <Button id="buttonCancel" title="L('cancelButton', 'Cancel')" style="Ti.UI.iOS.SystemButtonStyle.BORDERED" onClick="onCancel" />
        <FlexSpace/>
        <Button id="buttonDone" title="L('doneButton', 'Done')" style="Ti.UI.iOS.SystemButtonStyle.DONE" onClick="onDone" />
      </Items>
    </Toolbar>

    <Picker id="picker" />

    <View id="toolbar" platform="android">
      <Button id="buttonCancel" onClick="onCancel" title="L('cancelButton', 'Cancel')" />
      <Button id="buttonDone" onClick="onDone" title="L('doneButton', 'Done')" />
    </View>

  </View>
</Alloy>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant