bradmartin / nativescript-snackbar

:lollipop: :chocolate_bar: NativeScript plugin for Material Design SnackBar
Apache License 2.0
73 stars 12 forks source link

ActionTextColor is ignored #28

Closed VChabrette closed 6 years ago

VChabrette commented 6 years ago

Hi !

Firstly thanks for this awesome plugin !

However, I'm facing an issue with the "actionTextColor" not taken into account on android. Also, I don't see any reference to this option in the plugin's code.

Am I doing something wrong or is this functionnality not implemented yet ?

Thank you in advance

venkateshsj commented 6 years ago

Yeah, this is a very good plugin, but unfortunately, it seems nobody is contributing to its progress anymore. I too was facing issue with ActionTextColor being ignored.

I just looked into the file - \node_modules\nativescript-snackbar\snackbar.android.js, I have attached the updated file here, snackbar.android.js.txt

I modified the file to add '_setActionTextColor' method and to pass actionTextColor to '_setActionTextColor' in 'SnackBar.prototype.action' method. It works perfectly!

CLI info: nativescript - 3.4.3 - Up to date tns-core-modules - 3.4.1 - Up to date tns-android - 3.4.2 - Up to date tns-ios - 3.4.1 - Not installed

Anyone wanting to set the ActionTextColor,

  1. Replace the contents of snackbar.android.js (location gave above) with contents of attached file,
  2. Full build your project, (I had to uninstall app from device, delete 'android' folder from 'platforms' folder) and you are good to go! Hope this is helpful.
bradmartin commented 6 years ago

New version published to correct this. Sorry it went unnoticed for a while 😄