Skip to content

Commit

Permalink
Merge pull request #4783 from hieupham007/timob-13686-v2
Browse files Browse the repository at this point in the history
Timob 13686 v2: added supported for selectedBackgroundColor and selectedBackgroundImage
  • Loading branch information
pingwang2011 committed Oct 17, 2013
2 parents 6ae33d6 + 633e318 commit c9f526d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ public void processProperties(KrollDict d) {
if (d.containsKey(TiC.PROPERTY_ACCESSORY_TYPE)) {
int accessory = TiConvert.toInt(d.get(TiC.PROPERTY_ACCESSORY_TYPE), -1);
handleAccessory(accessory);
}
}
if (d.containsKey(TiC.PROPERTY_SELECTED_BACKGROUND_COLOR)) {
d.put(TiC.PROPERTY_BACKGROUND_SELECTED_COLOR, d.get(TiC.PROPERTY_SELECTED_BACKGROUND_COLOR));
}
if (d.containsKey(TiC.PROPERTY_SELECTED_BACKGROUND_IMAGE)) {
d.put(TiC.PROPERTY_BACKGROUND_SELECTED_IMAGE, d.get(TiC.PROPERTY_SELECTED_BACKGROUND_IMAGE));
}
super.processProperties(d);
}

Expand Down
10 changes: 6 additions & 4 deletions apidoc/Titanium/UI/ListItem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,33 +105,35 @@ properties:
Must be a local resource.
type: String
since: 3.2.0
platforms: [iphone, ipad]
platforms: [android, iphone, ipad]
accessors: false

- name: backgroundGradient
summary: Background gradient to render when the item is not selected.
type: Gradient
since: 3.2.0
platforms: [iphone, ipad]
platforms: [android, iphone, ipad]
accessors: false

- name: selectedBackgroundColor
summary: Background color of the view, as a color name or hex triplet when item is selected.
description: |
On Android, clicking on ListItem's sub-views will not trigger this unless these views have 'touchEnabled' set to false.
For information about color values, see the "Colors" section of <Titanium.UI>.
type: String
since: 3.2.0
platforms: [iphone, ipad]
platforms: [android, iphone, ipad]
default: Transparent
accessors: false

- name: selectedBackgroundImage
summary: Background image to render when the item is selected.
description: |
Must be a local resource.
On Android, clicking on ListItem's sub-views will not trigger this unless these views have 'touchEnabled' set to false.
type: String
since: 3.2.0
platforms: [iphone, ipad]
platforms: [android, iphone, ipad]
accessors: false

- name: selectedBackgroundGradient
Expand Down

0 comments on commit c9f526d

Please sign in to comment.