{"id":17008656,"url":"https://github.com/enchev/nativescript-dialog","last_synced_at":"2025-03-22T16:30:59.158Z","repository":{"id":57308561,"uuid":"44966951","full_name":"enchev/nativescript-dialog","owner":"enchev","description":null,"archived":false,"fork":false,"pushed_at":"2018-05-21T12:15:02.000Z","size":1476,"stargazers_count":22,"open_issues_count":11,"forks_count":11,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-01T17:37:33.928Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/enchev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-26T12:30:33.000Z","updated_at":"2022-11-03T10:11:52.000Z","dependencies_parsed_at":"2022-09-12T10:20:10.489Z","dependency_job_id":null,"html_url":"https://github.com/enchev/nativescript-dialog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enchev%2Fnativescript-dialog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enchev%2Fnativescript-dialog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enchev%2Fnativescript-dialog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enchev%2Fnativescript-dialog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enchev","download_url":"https://codeload.github.com/enchev/nativescript-dialog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244231686,"owners_count":20419979,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T05:28:55.389Z","updated_at":"2025-03-22T16:30:58.289Z","avatar_url":"https://github.com/enchev.png","language":"JavaScript","funding_links":[],"categories":["Awesome {N} [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)"],"sub_categories":["Table of Contents"],"readme":"# NativeScript Dialog\n\nA NativeScript plugin for iOS and Android that allows you to create custom dialog.\n\n## Installation\n`tns plugin add nativescript-dialog`\n\n## Usage\n\n###\n```XML\n\u003cPage\u003e\n   \u003cStackLayout\u003e\n     \u003cButton text=\"Show dialog\" tap=\"buttonTap\" /\u003e\n   \u003c/StackLayout\u003e\n\u003c/Page\u003e\n```\n\n```JavaScript\nvar platform = require(\"platform\");\nvar application = require(\"application\");\nvar dialog = require(\"nativescript-dialog\");\n\nexports.buttonTap = function(args){\n  var nativeView;\n\n  if(platform.device.os === platform.platformNames.ios){\n\t  nativeView = UIActivityIndicatorView.alloc().initWithActivityIndicatorStyle(UIActivityIndicatorViewStyle.UIActivityIndicatorViewStyleGray);\n    nativeView.startAnimating();\n  } else if(platform.device.os === platform.platformNames.android){\n\t  nativeView = new android.widget.ProgressBar(application.android.currentContext);\n    nativeView.setIndeterminate(true);\n  }\n\n  dialog.show({\n\ttitle: \"Loading...\",\n\tmessage: \"Please wait!\",\n\tcancelButtonText: \"Cancel\",\n\tnativeView: nativeView}\n  ).then(function(r){ console.log(\"Result: \" + r); },\n  function(e){console.log(\"Error: \" + e)});\n}\n```\niOS | Android\n------------ | -------------\n![iOS](/ios.png) | ![Android](/android.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenchev%2Fnativescript-dialog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenchev%2Fnativescript-dialog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenchev%2Fnativescript-dialog/lists"}