Skip to content

Commit c80c338

Browse files
authored
Merge pull request apache#246 from landsbankinn/CB-13409
Cb 13409 - Add more configurable options for toolbar in android and ios
2 parents 8e3f2f2 + 84a4644 commit c80c338

File tree

5 files changed

+183
-64
lines changed

5 files changed

+183
-64
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,3 @@ node_modules
2121

2222

2323

24-

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ instance, or the system browser.
101101

102102
- __options__: Options for the `InAppBrowser`. Optional, defaulting to: `location=yes`. _(String)_
103103

104-
The `options` string must not contain any blank space, and each feature's name/value pairs must be separated by a comma. Feature names are case insensitive.
105-
104+
The `options` string must not contain any blank space, and each feature's name/value pairs must be separated by a comma. Feature names are case insensitive.
105+
106106
All platforms support:
107107

108108
- __location__: Set to `yes` or `no` to turn the `InAppBrowser`'s location bar on or off.
@@ -112,7 +112,14 @@ instance, or the system browser.
112112
- __hidden__: set to `yes` to create the browser and load the page, but not show it. The loadstop event fires when loading is complete. Omit or set to `no` (default) to have the browser open and load normally.
113113
- __clearcache__: set to `yes` to have the browser's cookie cache cleared before the new window is opened
114114
- __clearsessioncache__: set to `yes` to have the session cookie cache cleared before the new window is opened
115+
- __closebuttoncaption__: set to a string to use as the close buttons caption instead of a X. Note that you need to localize this value yourself.
116+
- __closebuttoncolor__: set to a valid hex color string, for example: `#00ff00`, and it will change the
117+
close button color from default, regardless of being a text or default X. Only has effect if user has location set to `yes`.
115118
- __hardwareback__: set to `yes` to use the hardware back button to navigate backwards through the `InAppBrowser`'s history. If there is no previous page, the `InAppBrowser` will close. The default value is `yes`, so you must set it to `no` if you want the back button to simply close the InAppBrowser.
119+
- __hidenavigationbuttons__: set to `yes` to hide the navigation buttons on the location toolbar, only has effect if user has location set to `yes`. The default value is `no`.
120+
- __hideurlbar__: set to `yes` to hide the url bar on the location toolbar, only has effect if user has location set to `yes`. The default value is `no`.
121+
- __navigationbuttoncolor__: set to a valid hex color string, for example: `#00ff00`, and it will change the color of both navigation buttons from default. Only has effect if user has location set to `yes` and not hidenavigationbuttons set to `yes`.
122+
- __toolbarcolor__: set to a valid hex color string, for example: `#00ff00`, and it will change the color the toolbar from default. Only has effect if user has location set to `yes`.
116123
- __zoom__: set to `yes` to show Android browser's zoom controls, set to `no` to hide them. Default value is `yes`.
117124
- __mediaPlaybackRequiresUserAction__: Set to `yes` to prevent HTML5 audio or video from autoplaying (defaults to `no`).
118125
- __shouldPauseOnSuspend__: Set to `yes` to make InAppBrowser WebView to pause/resume with the app to stop background audio (this may be required to avoid Google Play issues like described in [CB-11013](https://issues.apache.org/jira/browse/CB-11013)).
@@ -123,9 +130,13 @@ instance, or the system browser.
123130
- __hidden__: set to `yes` to create the browser and load the page, but not show it. The loadstop event fires when loading is complete. Omit or set to `no` (default) to have the browser open and load normally.
124131
- __clearcache__: set to `yes` to have the browser's cookie cache cleared before the new window is opened
125132
- __clearsessioncache__: set to `yes` to have the session cookie cache cleared before the new window is opened
133+
- __closebuttoncolor__: set as a valid hex color string, for example: `#00ff00`, to change from the default __Done__ button's color. Only applicable if toolbar is not disabled.
126134
- __closebuttoncaption__: set to a string to use as the __Done__ button's caption. Note that you need to localize this value yourself.
127135
- __disallowoverscroll__: Set to `yes` or `no` (default is `no`). Turns on/off the UIWebViewBounce property.
136+
- __hidenavigationbuttons__: set to `yes` or `no` to turn the toolbar navigation buttons on or off (defaults to `no`). Only applicable if toolbar is not disabled.
128137
- __toolbar__: set to `yes` or `no` to turn the toolbar on or off for the InAppBrowser (defaults to `yes`)
138+
- __toolbarcolor__: set as a valid hex color string, for example: `#00ff00`, to change from the default color of the toolbar. Only applicable if toolbar is not disabled.
139+
- __toolbartranslucent__: set to `yes` or `no` to make the toolbar translucent(semi-transparent) (defaults to `yes`). Only applicable if toolbar is not disabled.
129140
- __enableViewportScale__: Set to `yes` or `no` to prevent viewport scaling through a meta tag (defaults to `no`).
130141
- __mediaPlaybackRequiresUserAction__: Set to `yes` to prevent HTML5 audio or video from autoplaying (defaults to `no`).
131142
- __allowInlineMediaPlayback__: Set to `yes` or `no` to allow in-line HTML5 media playback, displaying within the browser window rather than a device-specific playback interface. The HTML's `video` element must also include the `webkit-playsinline` attribute (defaults to `no`)

0 commit comments

Comments
 (0)