Reputation: 3975
Is there a way to style the Cordova plugin that opens a browser window inside the app? (In app browser)
The bar at the bottom is what needs to be styled to fit the style of the rest of the app.
Upvotes: 0
Views: 2695
Reputation: 504
If anyone is still looking for an answer to this. I was able to change the color of the toolbar.
In your CDVInAppBrowser.m
file, you can edit following line:
self.closeButton.tintColor = [UIColor colorWithRed:241.0 / 255.0 green:136.0 / 255.0 blue:0.0 / 250.0 alpha:1];
And add following lines:
self.backButton.tintColor = [UIColor whiteColor];
self.forwardButton.tintColor = [UIColor whiteColor];
Resulting in this layout
Upvotes: 1
Reputation: 1183
I've forked InAppBrowser and created plugin that allows you to style the browser extensively. But I've only done it for iOS and Android. Please take a look https://github.com/initialxy/cordova-plugin-themeablebrowser
Upvotes: 1
Reputation: 8940
So far I know, from html/css/javascript "NO", from native code "Yes"
You can directly change the plugin's native code.
Like in android, inside InAppBrowsser.java, this line
toolbar.setBackgroundColor(android.graphics.Color.LTGRAY);
Don't know which line to change in iOS. Remember to change the java file inside the platform folder too along with the outer plugin folder's java file.
Upvotes: 1