Skip to content

Commit

Permalink
fix(docu): Update documentation TabGroup/VideoPlayer/TableViewRow (#1…
Browse files Browse the repository at this point in the history
…3071)

* fix(docu): add more infos about shiftMode parameter

* video: volume

* deprecation text

* platform fix for backgroundSelectedColor and backgroundSelectedImage

* add TabGroup color example
  • Loading branch information
m1ga committed Mar 21, 2022
1 parent dbb7177 commit 5068dc1
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 12 deletions.
4 changes: 2 additions & 2 deletions apidoc/Titanium/Media/VideoPlayer.yml
Expand Up @@ -542,7 +542,7 @@ properties:
platforms: [android]
deprecated:
since: "7.0.0"
notes: Use [Titanium.Media.VideoPlayer.showsControls](Titanium.Media.VideoPlayer.showsControls) instead.
notes: On iOS, use [Titanium.Media.VideoPlayer.showsControls](Titanium.Media.VideoPlayer.showsControls) instead.
summary: The style of the playback controls.
description: Removed from iOS in SDK 7.0.0
type: Number
Expand Down Expand Up @@ -669,7 +669,7 @@ properties:
setting this will be accompanied by an OS-provided indicator. However, the iOS
simulator does not honor this volume setting, and is a known issue with Apple's
simulator.
platforms: [iphone, ipad, macos]
platforms: [android, iphone, ipad, macos]
type: Number
default: 1.0
since: "2.1"
Expand Down
55 changes: 45 additions & 10 deletions apidoc/Titanium/UI/TabGroup.yml
Expand Up @@ -51,7 +51,7 @@ excludes:
borderColor,borderRadius,borderWidth,bottom,children,enabled,focusable,height,
horizontalWrap,layout,left,opacity,right,softKeyboardOnFocus,
top,transform,width,zIndex]
events: [click, dblclick, doubletap, keypressed, longclick, longpress, pinch, postlayout,
events: [click, dblclick, doubletap, keypressed, longclick, longpress, pinch, postlayout,
singletap, swipe, touchcancel, touchend, touchmove, touchstart, twofingertap]

events:
Expand Down Expand Up @@ -333,7 +333,7 @@ properties:
A value of `transparent` results in a semi-opaque black bar style.
type: [String, Titanium.UI.Color]
platforms: [iphone, ipad, android, macos]

- name: paddingLeft
summary: Left padding of bottom navigation
description: |
Expand All @@ -342,7 +342,7 @@ properties:
since: "10.1.0"
type: [Number,String]
platforms: [android]

- name: paddingRight
summary: Right padding of bottom navigation
description: |
Expand All @@ -360,7 +360,7 @@ properties:
since: "10.1.0"
type: [Number,String]
platforms: [android]

- name: translucent
summary: Boolean value indicating if the nav bar (typically for the **More** tab), is translucent.
platforms: [iphone, ipad, macos]
Expand Down Expand Up @@ -465,9 +465,13 @@ properties:
This property allows the user to choose whether they would use this design
behavior.
Default is 1 (true) to show title only when the tab is selected. Selected tab will be bigger.
Set it to 0 (false) to show all titles and make the buttons the same size.
Set it to 2 hide all titles and make the buttons the same size. Title stays hidden for active tabs.
NOTE: This property only affects TabGroups with the [TABS_STYLE_BOTTOM_NAVIGATION](Titanium.UI.Android.TABS_STYLE_BOTTOM_NAVIGATION).
type: Boolean
default: true
type: Number
default: 1
since: "8.0.0"
platforms: [android]

Expand All @@ -483,8 +487,8 @@ properties:
prior to 8.0.0.GA. It displays the TabGroup with a list of Tabs at the top of the screen.
[TABS_STYLE_BOTTOM_NAVIGATION](Titanium.UI.Android.TABS_STYLE_BOTTOM_NAVIGATION) is a style that displays
the TabGroup with a list of Tabs in a controller at the bottom of the screen. The recommended usage of this
style is for items count between three and five: (https://material.io/design/components/bottom-navigation.html#usage)
the TabGroup with a list of Tabs in a controller at the bottom of the screen. The recommended usage of this
style is for items count between three and five: (https://material.io/design/components/bottom-navigation.html#usage)
In Android it is limited to supporting a maximum number of five tabs.
You can use paddingLeft, paddingRight, paddingBottom to create a floating bottom navigation. If you want to change the
radius or background color you'll need to create `/app/platform/android/res/drawable/titanium_rounded_corners.xml` and set it to
Expand All @@ -509,7 +513,7 @@ properties:
A tab's [backgroundColor](Titanium.UI.Tab.backgroundColor) property takes precedence if set.
This property applies to all states and tabs, not just inactive tabs. Furthermore, the inactive
This property applies to all states and tabs, not just inactive tabs. Furthermore, the inactive
tab icons without activeIcon will be tinted this color.
type: [String, Titanium.UI.Color]
since: {android: "3.0.0", iphone: "3.0.0", ipad: "3.0.0"}
Expand Down Expand Up @@ -597,7 +601,7 @@ properties:
- name: shadowImage
summary: Image of the shadow placed between the tab bar and the content area.
description: |
The <Titanium.UI.TabGroup.tabsBackgroundImage> property must also be set
The <Titanium.UI.TabGroup.tabsBackgroundImage> property must also be set
in order for this to take effect.
type: String
platforms: [iphone, ipad, macos]
Expand Down Expand Up @@ -689,3 +693,34 @@ examples:
});
tabGroup.open();
```
- title: Example with different colors
example: |
Create a TabGroup with different active and inactive colors.
``` js
function createTab(title, icon) {
const window = Ti.UI.createWindow({ title: title });
window.add(Ti.UI.createLabel({ text: title + " View" }));
const tab = Ti.UI.createTab({
title: title,
icon: icon,
window: window,
});
return tab;
}
const tabGroup = Ti.UI.createTabGroup({
tabs: [
createTab("Tab 1", "/assets/images/tab1.png"),
createTab("Tab 2", "/assets/images/tab2.png"),
createTab("Tab 3", "/assets/images/tab1.png")
],
activeTintColor: "red",
activeTitleColor: "red",
tintColor: "purple",
titleColor: "purple",
tabsBackgroundColor: "#F7F7F7",
});
tabGroup.open();
```
2 changes: 2 additions & 0 deletions apidoc/Titanium/UI/TableViewRow.yml
Expand Up @@ -353,11 +353,13 @@ properties:
For information about color values, see the "Colors" section of <Titanium.UI>.
type: [String, Titanium.UI.Color]
since: "10.0.0"
platforms: [android, iphone, ipad, macos]

- name: backgroundSelectedImage
summary: Background image to render when the row is selected.
type: String
since: "10.0.0"
platforms: [android, iphone, ipad, macos]

- name: selectedBackgroundColor
summary: Background color to render when the row is selected, as a color name or hex triplet.
Expand Down

0 comments on commit 5068dc1

Please sign in to comment.