Skip to content

Commit

Permalink
feat(android): expose Picker text color (#13568)
Browse files Browse the repository at this point in the history
* feat(android): expose Picker text color

* feat(android): expose Picker text color
  • Loading branch information
m1ga committed Sep 25, 2022
1 parent 4840523 commit e37bef9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Expand Up @@ -225,6 +225,10 @@ public boolean forwardDelete(View view, Editable content, int keyCode, KeyEvent
textInputLayout.addView(editText, new TextInputLayout.LayoutParams(
TextInputLayout.LayoutParams.MATCH_PARENT, TextInputLayout.LayoutParams.MATCH_PARENT));

if (hasPropertyAndNotNull(TiC.PROPERTY_COLOR)) {
editText.setTextColor(TiConvert.toColor(getProperty(TiC.PROPERTY_COLOR).toString()));
}

return textInputLayout;
}

Expand Down
14 changes: 12 additions & 2 deletions apidoc/Titanium/UI/Picker.yml
Expand Up @@ -205,6 +205,9 @@ properties:
summary: Background color of the picker, as a color name or hex triplet.
description: |
For information about color values, see the "Colors" section of <Titanium.UI>.
Android: If you want to change the backgroundColor you have to set the `borderStyle` to
`Ti.UI.INPUT_BORDERSTYLE_ROUNDED` or `Ti.UI.INPUT_BORDERSTYLE_NONE`
type: [String, Titanium.UI.Color]
platforms: [iphone, ipad, android, macos]
since: { iphone: "5.2.0", ipad: "5.2.0", android: "0.9.0"}
Expand All @@ -216,7 +219,7 @@ properties:
This is an Android only property which only applies to pickers of type:
* [PICKER_TYPE_DATE](Titanium.UI.PICKER_TYPE_DATE) or [PICKER_TYPE_TIME](Titanium.UI.PICKER_TYPE_TIME)
that also have [datePickerStyle](Titanium.UI.Picker.datePickerStyle) set to
that also have [datePickerStyle](Titanium.UI.Picker.datePickerStyle) set to
[DATE_PICKER_STYLE_COMPACT](Titanium.UI.DATE_PICKER_STYLE_COMPACT).
* [PICKER_TYPE_PLAIN](Titanium.UI.PICKER_TYPE_PLAIN) that also have property
Expand Down Expand Up @@ -297,7 +300,7 @@ properties:
This is an Android only property which only applies to pickers of type:
* [PICKER_TYPE_DATE](Titanium.UI.PICKER_TYPE_DATE) or [PICKER_TYPE_TIME](Titanium.UI.PICKER_TYPE_TIME)
that also have [datePickerStyle](Titanium.UI.Picker.datePickerStyle) set to
that also have [datePickerStyle](Titanium.UI.Picker.datePickerStyle) set to
[DATE_PICKER_STYLE_COMPACT](Titanium.UI.DATE_PICKER_STYLE_COMPACT).
* [PICKER_TYPE_PLAIN](Titanium.UI.PICKER_TYPE_PLAIN) that also have property
Expand Down Expand Up @@ -515,6 +518,13 @@ properties:
type: Font
platforms: [android]

- name: color
summary: Text color of the Picker
type: [String, Titanium.UI.Color]
platforms: [android]
availability: creation
since: { android: "12.0.0"}

examples:
- title: Multi-Column Picker using Alloy XML Markup
example: |
Expand Down

0 comments on commit e37bef9

Please sign in to comment.