NathanWalker / nativescript-fancyalert

Fancy alerts for NativeScript.
Other
147 stars 38 forks source link

Bugfix/fix image in color dialog #84

Closed Rahul1d closed 3 years ago

Rahul1d commented 4 years ago

The ColorDialog lib doesn't accept imagePath as string. The image can be set as a resourceId. So, i have updated the setColorDialog() method to set the image as resourceId.

Demo code to set Image:-

 public showCustomImage() {
    TNSFancyAlert.showCustomImage(
      "nativescript.png",
      "#2B33FF",
      "@drawable/customimage",     //Place image name without extension. //Image should be placed in "~App_Resources\Android\src\main\res\drawable-xxx"
      `Using your own images is sure nice.`,
      "Yes!"
    );
  }