Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/android/InAppBrowser.java
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ private View createCloseButton(int id) {
// Use TextView for text
TextView close = new TextView(cordova.getActivity());
close.setText(closeButtonCaption);
close.setTextSize(20);
close.setTextSize(14);
if (closeButtonColor != "") close.setTextColor(android.graphics.Color.parseColor(closeButtonColor));
close.setGravity(android.view.Gravity.CENTER_VERTICAL);
close.setPadding(this.dpToPixels(10), 0, this.dpToPixels(10), 0);
Expand Down
5 changes: 5 additions & 0 deletions src/ios/CDVWKInAppBrowser.m
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,11 @@ - (void)setCloseButtonTitle:(NSString*)title : (NSString*) colorString : (int) b
// If color on closebutton is requested then initialize with that that color, otherwise use initialize with default
self.closeButton.tintColor = colorString != nil ? [self colorFromHexString:colorString] : [UIColor colorWithRed:60.0 / 255.0 green:136.0 / 255.0 blue:230.0 / 255.0 alpha:1];

NSUInteger fontSize = 14;
UIFont *font = [UIFont systemFontOfSize:fontSize];
NSDictionary *attributes = @{NSFontAttributeName: font};
[self.closeButton setTitleTextAttributes:attributes forState:UIControlStateNormal];

NSMutableArray* items = [self.toolbar.items mutableCopy];
[items replaceObjectAtIndex:buttonIndex withObject:self.closeButton];
[self.toolbar setItems:items];
Expand Down