forked from github/Toast-PhoneGap-Plugin
#2 Allow the user set a textColor - fixed a compiler warning, added doc, and bumped the version
This commit is contained in:
parent
37c14a6d2d
commit
5e5251bbd2
@ -226,6 +226,7 @@ Note that on WP this object is currently ignored.
|
|||||||
styling: {
|
styling: {
|
||||||
opacity: 0.75, // 0.0 (transparent) to 1.0 (opaque). Default 0.8
|
opacity: 0.75, // 0.0 (transparent) to 1.0 (opaque). Default 0.8
|
||||||
backgroundColor: '#FF0000', // make sure you use #RRGGBB. Default #333333
|
backgroundColor: '#FF0000', // make sure you use #RRGGBB. Default #333333
|
||||||
|
textColor: '#FFFF00', // Ditto. Default #FFFFFF
|
||||||
cornerRadius: 16, // minimum is 0 (square). iOS default 20, Android default 100
|
cornerRadius: 16, // minimum is 0 (square). iOS default 20, Android default 100
|
||||||
horizontalPadding: 20, // iOS default 16, Android default 50
|
horizontalPadding: 20, // iOS default 16, Android default 50
|
||||||
verticalPadding: 16 // iOS default 12, Android default 30
|
verticalPadding: 16 // iOS default 12, Android default 30
|
||||||
@ -250,6 +251,7 @@ The Android code was entirely created by me.
|
|||||||
For iOS most credits go to this excellent [Toast for iOS project by Charles Scalesse] (https://github.com/scalessec/Toast).
|
For iOS most credits go to this excellent [Toast for iOS project by Charles Scalesse] (https://github.com/scalessec/Toast).
|
||||||
|
|
||||||
## 6. CHANGELOG
|
## 6. CHANGELOG
|
||||||
|
- 2.4.1: As an addition to 2.4.0, [Sino](https://github.com/SinoBoeckmann) added the option to change the text color!
|
||||||
- 2.4.0: You can now style the Toast with a number of properties. See
|
- 2.4.0: You can now style the Toast with a number of properties. See
|
||||||
- 2.3.2: The click event introduced with 2.3.0 did not work with Android 5+.
|
- 2.3.2: The click event introduced with 2.3.0 did not work with Android 5+.
|
||||||
- 2.3.0: The plugin will now report back to JS if Toasts were tapped by the user.
|
- 2.3.0: The plugin will now report back to JS if Toasts were tapped by the user.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cordova-plugin-x-toast",
|
"name": "cordova-plugin-x-toast",
|
||||||
"version": "2.4.0",
|
"version": "2.4.1",
|
||||||
"description": "This plugin allows you to show a Toast. A Toast is a little non intrusive buttonless popup which automatically disappears.",
|
"description": "This plugin allows you to show a Toast. A Toast is a little non intrusive buttonless popup which automatically disappears.",
|
||||||
"cordova": {
|
"cordova": {
|
||||||
"id": "cordova-plugin-x-toast",
|
"id": "cordova-plugin-x-toast",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
id="nl.x-services.plugins.toast"
|
id="nl.x-services.plugins.toast"
|
||||||
version="2.4.0">
|
version="2.4.1">
|
||||||
|
|
||||||
<name>Toast</name>
|
<name>Toast</name>
|
||||||
|
|
||||||
|
@ -355,7 +355,7 @@ static id styling;
|
|||||||
titleLabel.font = [UIFont boldSystemFontOfSize:CSToastFontSize];
|
titleLabel.font = [UIFont boldSystemFontOfSize:CSToastFontSize];
|
||||||
titleLabel.textAlignment = NSTextAlignmentLeft;
|
titleLabel.textAlignment = NSTextAlignmentLeft;
|
||||||
titleLabel.lineBreakMode = NSLineBreakByWordWrapping;
|
titleLabel.lineBreakMode = NSLineBreakByWordWrapping;
|
||||||
titleLabel.textColor = titleLabelTextColor;
|
titleLabel.textColor = theTitleLabelTextColor;
|
||||||
titleLabel.backgroundColor = [UIColor clearColor];
|
titleLabel.backgroundColor = [UIColor clearColor];
|
||||||
titleLabel.alpha = 1.0;
|
titleLabel.alpha = 1.0;
|
||||||
titleLabel.text = title;
|
titleLabel.text = title;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user