Set custom font size
This commit is contained in:
parent
8ee1d38821
commit
5f6202f3fc
@ -740,7 +740,7 @@ public class InAppBrowser extends CordovaPlugin {
|
||||
// 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);
|
||||
|
@ -936,6 +936,11 @@ BOOL isExiting = FALSE;
|
||||
// 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];
|
||||
|
Loading…
Reference in New Issue
Block a user