AddLayout, Alert, Broadcast, Call, CopyFile, CopyFolder, CreateAudioRecorder, CreateBluetoothList, CreateBluetoothSerial, CreateButton, CreateCameraView, CreateCheckBox, CreateCrypt, CreateDebug, CreateDialog, CreateDownloader, CreateEmail, CreateGLView, CreateIOIO, CreateImage, CreateLayout, CreateList, CreateListDialog, CreateListView, CreateLocator, CreateMediaPlayer, CreateMediaStore, CreateNetClient, CreateNotification, CreateNxt, CreateNxtRemote, CreateObject, CreatePlayStore, CreateSMS, CreateScroller, CreateSeekBar, CreateSensor, CreateService, CreateShortcut, CreateSmartWatch, CreateSpeechRec, CreateSpinner, CreateSynth, CreateTabs, CreateText, CreateTextEdit, CreateToggle, CreateUSBSerial, CreateVideoView, CreateWebServer, CreateWebView, CreateYesNoDialog, CreateZipUtil, Debug, DeleteFile, DeleteFolder, DestroyLayout, EnableBackKey, Execute, Exit, ExtractAssets, FileExists, FolderExists, GetAppName, GetAppPath, GetBuildNum, GetClipboardText, GetCountry, GetCountryCode, GetData, GetDefaultOrientation, GetDisplayHeight, GetDisplayWidth, GetExternalFolder, GetFileDate, GetFileSize, GetFreeSpace, GetIPAddress, GetLanguage, GetLanguageCode, GetLastButton, GetLastCheckBox, GetLastImage, GetLastToggle, GetMacAddress, GetMetadata, GetModel, GetName, GetOSVersion, GetObjects, GetOptions, GetOrientation, GetPath, GetPrivateFolder, GetRotation, GetScreenDensity, GetScreenHeight, GetScreenWidth, GetSharedFiles, GetSharedText, GetTop, GetVersion, GoToSleep, HideKeyboard, HideProgress, HideProgressBar, IsBluetoothOn, IsFolder, IsNewVersion, IsPro, IsScreenOn, IsTablet, KillApp, ListFolder, LoadBoolean, LoadNumber, LoadPlugin, LoadScript, LoadText, MakeFolder, OpenFile, OpenUrl, PreventScreenLock, PreventWifiSleep, ReadFile, RemoveLayout, RenameFile, RenameFolder, SaveBoolean, SaveNumber, SaveText, SendMail, SetAlarm, SetClipboardText, SetData, SetDebugEnabled, SetMenu, SetOnBroadcast, Setonerror, SetOrientation, SetScreenBrightness, SetScreenMode, SetSharedApp, SetTitle, ShowDebug, ShowMenu, ShowPopup, ShowProgress, ShowProgressBar, SimulateTouch, StartApp, StartDebugServer, StartService, StopApp, StopService, TextToSpeech, ToBack, Try, UpdateProgressBar, Vibrate, Wait, WriteFile, _Extract
[code=javascript]var list_icons = [
"fa-angellist",
"fa-area-chart",
"fa-at",
"fa-bell-slash",
"fa-bell-slash-o",
"fa-bicycle",
"fa-binoculars",
"fa-birthday-cake",
"fa-bus",
"fa-calculator",
"fa-cc",
"fa-cc-amex",
"fa-cc-discover",
"fa-cc-mastercard",
"fa-cc-paypal",
"fa-cc-stripe",
"fa-cc-visa",
"fa-copyright",
"fa-eyedropper",
"fa-futbol-o",
"fa-google-wallet",
"fa-ils",
"fa-ioxhost",
"fa-lastfm",
"fa-lastfm-square",
"fa-line-chart",
"fa-meanpath",
"fa-newspaper-o",
"fa-paint-brush",
"fa-paypal",
"fa-pie-chart",
"fa-plug",
"fa-shekel",
"fa-sheqel",
"fa-slideshare",
"fa-soccer-ball-o",
"fa-toggle-off",
"fa-toggle-on",
"fa-trash",
"fa-tty",
"fa-twitch",
"fa-wifi",
"fa-yelp",
"fa-adjust",
"fa-anchor",
"fa-archive",
"fa-area-chart",
"fa-arrows",
"fa-arrows-h",
"fa-arrows-v",
"fa-asterisk",
"fa-at",
"fa-automobile",
"fa-ban",
"fa-bank",
"fa-bar-chart",
"fa-bar-chart-o",
"fa-barcode",
"fa-bars",
"fa-beer",
"fa-bell",
"fa-bell-o",
"fa-bell-slash",
"fa-bell-slash-o",
"fa-bicycle",
"fa-binoculars",
"fa-birthday-cake",
"fa-bolt",
"fa-bomb",
"fa-book",
"fa-bookmark",
"fa-bookmark-o",
"fa-briefcase",
"fa-bug",
"fa-building",
"fa-building-o",
"fa-bullhorn",
"fa-bullseye",
"fa-bus",
"fa-cab",
"fa-calculator",
"fa-calendar",
"fa-calendar-o",
"fa-camera",
"fa-camera-retro",
"fa-car",
"fa-caret-square-o-down",
"fa-caret-square-o-left",
"fa-caret-square-o-right",
"fa-caret-square-o-up",
"fa-cc",
"fa-certificate",
"fa-check",
"fa-check-circle",
"fa-check-circle-o",
"fa-check-square",
"fa-check-square-o",
"fa-child",
"fa-circle",
"fa-circle-o",
"fa-circle-o-notch",
"fa-circle-thin",
"fa-clock-o",
"fa-close",
"fa-cloud",
"fa-cloud-download",
"fa-cloud-upload",
"fa-code",
"fa-code-fork",
"fa-coffee",
"fa-cog",
"fa-cogs",
"fa-comment",
"fa-comment-o",
"fa-comments",
"fa-comments-o",
"fa-compass",
"fa-copyright",
"fa-credit-card",
"fa-crop",
"fa-crosshairs",
"fa-cube",
"fa-cubes",
"fa-cutlery",
"fa-dashboard",
"fa-database",
"fa-desktop",
"fa-dot-circle-o",
"fa-download",
"fa-edit",
"fa-ellipsis-h",
"fa-ellipsis-v",
"fa-envelope",
"fa-envelope-o",
"fa-envelope-square",
"fa-eraser",
"fa-exchange",
"fa-exclamation",
"fa-exclamation-circle",
"fa-exclamation-triangle",
"fa-external-link",
"fa-external-link-square",
"fa-eye",
"fa-eye-slash",
"fa-eyedropper",
"fa-fax",
"fa-female",
"fa-fighter-jet",
"fa-file-archive-o",
"fa-file-audio-o",
"fa-file-code-o",
"fa-file-excel-o",
"fa-file-image-o",
"fa-file-movie-o",
"fa-file-pdf-o",
"fa-file-photo-o",
"fa-file-picture-o",
"fa-file-powerpoint-o",
"fa-file-sound-o",
"fa-file-video-o",
"fa-file-word-o",
"fa-file-zip-o",
"fa-film",
"fa-filter",
"fa-fire",
"fa-fire-extinguisher",
"fa-flag",
"fa-flag-checkered",
"fa-flag-o",
"fa-flash",
"fa-flask",
"fa-folder",
"fa-folder-o",
"fa-folder-open",
"fa-folder-open-o",
"fa-frown-o",
"fa-futbol-o",
"fa-gamepad",
"fa-gavel",
"fa-gear",
"fa-gears",
"fa-gift",
"fa-glass",
"fa-globe",
"fa-graduation-cap",
"fa-group",
"fa-hdd-o",
"fa-headphones",
"fa-heart",
"fa-heart-o",
"fa-history",
"fa-home",
"fa-image",
"fa-inbox",
"fa-info",
"fa-info-circle",
"fa-institution",
"fa-key",
"fa-keyboard-o",
"fa-language",
"fa-laptop",
"fa-leaf",
"fa-legal",
"fa-lemon-o",
"fa-level-down",
"fa-level-up",
"fa-life-bouy",
"fa-life-buoy",
"fa-life-ring",
"fa-life-saver",
"fa-lightbulb-o",
"fa-line-chart",
"fa-location-arrow",
"fa-lock",
"fa-magic",
"fa-magnet",
"fa-mail-forward",
"fa-mail-reply",
"fa-mail-reply-all",
"fa-male",
"fa-map-marker",
"fa-meh-o",
"fa-microphone",
"fa-microphone-slash",
"fa-minus",
"fa-minus-circle",
"fa-minus-square",
"fa-minus-square-o",
"fa-mobile",
"fa-mobile-phone",
"fa-money",
"fa-moon-o",
"fa-mortar-board",
"fa-music",
"fa-navicon",
"fa-newspaper-o",
"fa-paint-brush",
"fa-paper-plane",
"fa-paper-plane-o",
"fa-paw",
"fa-pencil",
"fa-pencil-square",
"fa-pencil-square-o",
"fa-phone",
"fa-phone-square",
"fa-photo",
"fa-picture-o",
"fa-pie-chart",
"fa-plane",
"fa-plug",
"fa-plus",
"fa-plus-circle",
"fa-plus-square",
"fa-plus-square-o",
"fa-power-off",
"fa-print",
"fa-puzzle-piece",
"fa-qrcode",
"fa-question",
"fa-question-circle",
"fa-quote-left",
"fa-quote-right",
"fa-random",
"fa-recycle",
"fa-refresh",
"fa-remove",
"fa-reorder",
"fa-reply",
"fa-reply-all",
"fa-retweet",
"fa-road",
"fa-rocket",
"fa-rss",
"fa-rss-square",
"fa-search",
"fa-search-minus",
"fa-search-plus",
"fa-send",
"fa-send-o",
"fa-share",
"fa-share-alt",
"fa-share-alt-square",
"fa-share-square",
"fa-share-square-o",
"fa-shield",
"fa-shopping-cart",
"fa-sign-in",
"fa-sign-out",
"fa-signal",
"fa-sitemap",
"fa-sliders",
"fa-smile-o",
"fa-soccer-ball-o",
"fa-sort",
"fa-sort-alpha-asc",
"fa-sort-alpha-desc",
"fa-sort-amount-asc",
"fa-sort-amount-desc",
"fa-sort-asc",
"fa-sort-desc",
"fa-sort-down",
"fa-sort-numeric-asc",
"fa-sort-numeric-desc",
"fa-sort-up",
"fa-space-shuttle",
"fa-spinner",
"fa-spoon",
"fa-square",
"fa-square-o",
"fa-star",
"fa-star-half",
"fa-star-half-empty",
"fa-star-half-full",
"fa-star-half-o",
"fa-star-o",
"fa-suitcase",
"fa-sun-o",
"fa-support",
"fa-tablet",
"fa-tachometer",
"fa-tag",
"fa-tags",
"fa-tasks",
"fa-taxi",
"fa-terminal",
"fa-thumb-tack",
"fa-thumbs-down",
"fa-thumbs-o-down",
"fa-thumbs-o-up",
"fa-thumbs-up",
"fa-ticket",
"fa-times",
"fa-times-circle",
"fa-times-circle-o",
"fa-tint",
"fa-toggle-down",
"fa-toggle-left",
"fa-toggle-off",
"fa-toggle-on",
"fa-toggle-right",
"fa-toggle-up",
"fa-trash",
"fa-trash-o",
"fa-tree",
"fa-trophy",
"fa-truck",
"fa-tty",
"fa-umbrella",
"fa-university",
"fa-unlock",
"fa-unlock-alt",
"fa-unsorted",
"fa-upload",
"fa-user",
"fa-users",
"fa-video-camera",
"fa-volume-down",
"fa-volume-off",
"fa-volume-up",
"fa-warning",
"fa-wheelchair",
"fa-wifi",
"fa-wrench",
"fa-file",
"fa-file-archive-o",
"fa-file-audio-o",
"fa-file-code-o",
"fa-file-excel-o",
"fa-file-image-o",
"fa-file-movie-o",
"fa-file-o",
"fa-file-pdf-o",
"fa-file-photo-o",
"fa-file-picture-o",
"fa-file-powerpoint-o",
"fa-file-sound-o",
"fa-file-text",
"fa-file-text-o",
"fa-file-video-o",
"fa-file-word-o",
"fa-file-zip-o",
"fa-circle-o-notch",
"fa-cog",
"fa-gear",
"fa-refresh",
"fa-spinner",
"fa-check-square",
"fa-check-square-o",
"fa-circle",
"fa-circle-o",
"fa-dot-circle-o",
"fa-minus-square",
"fa-minus-square-o",
"fa-plus-square",
"fa-plus-square-o",
"fa-square",
"fa-square-o",
"fa-cc-amex",
"fa-cc-discover",
"fa-cc-mastercard",
"fa-cc-paypal",
"fa-cc-stripe",
"fa-cc-visa",
"fa-credit-card",
"fa-google-wallet",
"fa-paypal",
"fa-area-chart",
"fa-bar-chart",
"fa-bar-chart-o",
"fa-line-chart",
"fa-pie-chart",
"fa-bitcoin",
"fa-btc",
"fa-cny",
"fa-dollar",
"fa-eur",
"fa-euro",
"fa-gbp",
"fa-ils",
"fa-inr",
"fa-jpy",
"fa-krw",
"fa-money",
"fa-rmb",
"fa-rouble",
"fa-rub",
"fa-ruble",
"fa-rupee",
"fa-shekel",
"fa-sheqel",
"fa-try",
"fa-turkish-lira",
"fa-usd",
"fa-won",
"fa-yen",
"fa-align-center",
"fa-align-justify",
"fa-align-left",
"fa-align-right",
"fa-bold",
"fa-chain",
"fa-chain-broken",
"fa-clipboard",
"fa-columns",
"fa-copy",
"fa-cut",
"fa-dedent",
"fa-eraser",
"fa-file",
"fa-file-o",
"fa-file-text",
"fa-file-text-o",
"fa-files-o",
"fa-floppy-o",
"fa-font",
"fa-header",
"fa-indent",
"fa-italic",
"fa-link",
"fa-list",
"fa-list-alt",
"fa-list-ol",
"fa-list-ul",
"fa-outdent",
"fa-paperclip",
"fa-paragraph",
"fa-paste",
"fa-repeat",
"fa-rotate-left",
"fa-rotate-right",
"fa-save",
"fa-scissors",
"fa-strikethrough",
"fa-subscript",
"fa-superscript",
"fa-table",
"fa-text-height",
"fa-text-width",
"fa-th",
"fa-th-large",
"fa-th-list",
"fa-underline",
"fa-undo",
"fa-unlink",
"fa-angle-double-down",
"fa-angle-double-left",
"fa-angle-double-right",
"fa-angle-double-up",
"fa-angle-down",
"fa-angle-left",
"fa-angle-right",
"fa-angle-up",
"fa-arrow-circle-down",
"fa-arrow-circle-left",
"fa-arrow-circle-o-down",
"fa-arrow-circle-o-left",
"fa-arrow-circle-o-right",
"fa-arrow-circle-o-up",
"fa-arrow-circle-right",
"fa-arrow-circle-up",
"fa-arrow-down",
"fa-arrow-left",
"fa-arrow-right",
"fa-arrow-up",
"fa-arrows",
"fa-arrows-alt",
"fa-arrows-h",
"fa-arrows-v",
"fa-caret-down",
"fa-caret-left",
"fa-caret-right",
"fa-caret-square-o-down",
"fa-caret-square-o-left",
"fa-caret-square-o-right",
"fa-caret-square-o-up",
"fa-caret-up",
"fa-chevron-circle-down",
"fa-chevron-circle-left",
"fa-chevron-circle-right",
"fa-chevron-circle-up",
"fa-chevron-down",
"fa-chevron-left",
"fa-chevron-right",
"fa-chevron-up",
"fa-hand-o-down",
"fa-hand-o-left",
"fa-hand-o-right",
"fa-hand-o-up",
"fa-long-arrow-down",
"fa-long-arrow-left",
"fa-long-arrow-right",
"fa-long-arrow-up",
"fa-toggle-down",
"fa-toggle-left",
"fa-toggle-right",
"fa-toggle-up",
"fa-arrows-alt",
"fa-backward",
"fa-compress",
"fa-eject",
"fa-expand",
"fa-fast-backward",
"fa-fast-forward",
"fa-forward",
"fa-pause",
"fa-play",
"fa-play-circle",
"fa-play-circle-o",
"fa-step-backward",
"fa-step-forward",
"fa-stop",
"fa-youtube-play",
"fa-adn",
"fa-android",
"fa-angellist",
"fa-apple",
"fa-behance",
"fa-behance-square",
"fa-bitbucket",
"fa-bitbucket-square",
"fa-bitcoin",
"fa-btc",
"fa-cc-amex",
"fa-cc-discover",
"fa-cc-mastercard",
"fa-cc-paypal",
"fa-cc-stripe",
"fa-cc-visa",
"fa-codepen",
"fa-css3",
"fa-delicious",
"fa-deviantart",
"fa-digg",
"fa-dribbble",
"fa-dropbox",
"fa-drupal",
"fa-empire",
"fa-facebook",
"fa-facebook-square",
"fa-flickr",
"fa-foursquare",
"fa-ge",
"fa-git",
"fa-git-square",
"fa-github",
"fa-github-alt",
"fa-github-square",
"fa-gittip",
"fa-google",
"fa-google-plus",
"fa-google-plus-square",
"fa-google-wallet",
"fa-hacker-news",
"fa-html5",
"fa-instagram",
"fa-ioxhost",
"fa-joomla",
"fa-jsfiddle",
"fa-lastfm",
"fa-lastfm-square",
"fa-linkedin",
"fa-linkedin-square",
"fa-linux",
"fa-maxcdn",
"fa-meanpath",
"fa-openid",
"fa-pagelines",
"fa-paypal",
"fa-pied-piper",
"fa-pied-piper-alt",
"fa-pinterest",
"fa-pinterest-square",
"fa-qq",
"fa-ra",
"fa-rebel",
"fa-reddit",
"fa-reddit-square",
"fa-renren",
"fa-share-alt",
"fa-share-alt-square",
"fa-skype",
"fa-slack",
"fa-slideshare",
"fa-soundcloud",
"fa-spotify",
"fa-stack-exchange",
"fa-stack-overflow",
"fa-steam",
"fa-steam-square",
"fa-stumbleupon",
"fa-stumbleupon-circle",
"fa-tencent-weibo",
"fa-trello",
"fa-tumblr",
"fa-tumblr-square",
"fa-twitch",
"fa-twitter",
"fa-twitter-square",
"fa-vimeo-square",
"fa-vine",
"fa-vk",
"fa-wechat",
"fa-weibo",
"fa-weixin",
"fa-windows",
"fa-wordpress",
"fa-xing",
"fa-xing-square",
"fa-yahoo",
"fa-yelp",
"fa-youtube",
"fa-youtube-play",
"fa-youtube-square",
"fa-ambulance",
"fa-h-square",
"fa-hospital-o",
"fa-medkit",
"fa-plus-square",
"fa-stethoscope",
"fa-user-md",
"fa-wheelchair"
]
function OnStart()
{
lay = app.CreateLayout("linear", "VCenter,FillXY");
var list = [];
for(var i in list_icons) {
list += '['+list_icons[i]+'] '+list_icons[i]+','
}
lst = app.CreateList( list, 0.95, 1, "FontAwesome" );
lst.SetTextSize( 25 );
lst.SetOnTouch(Copy);
lay.AddChild( lst );
app.AddLayout( lay );
}
function Copy(i) {
app.SetClipboardText(i.slice(2));
app.ShowPopup('Имя скопировано в буфер');
}</pre>
[code=javascript]function Example() {
layMain = app.CreateLayout("Linear", "FillXY");
var ttl = app.CreateText("title")
ttl.SetTextSize(15)
layMain.AddChild(ttl)
var scroll = app.CreateScroller(1.0, 0.95);
layMain.AddChild( scroll );
var layScroll = app.CreateLayout("Linear", "Left");
scroll.AddChild( layScroll );
arr = [];
list = app.ListFolder("/sdcard");
for(var i in list) {
var lt = app.CreateLayout("Linear", "Horizontal,FillXY");
lt.SetMargins(0, 0.01, 0, 0);
var txt = app.CreateText(list[i], 0.8, -1,"Multiline,FillY,Left");
txt.SetTextSize(12);
lt.AddChild(txt)
arr[i] = app.CreateButton("ok", 0.2 , -1, "FillY");
arr[i].SetOnTouch(btn_OnTouch);
lt.AddChild(arr[i])
layScroll.AddChild(lt) }
app.AddLayout(layMain)
}
function btn_OnTouch() {
var btn = app.GetLastButton();
var indexTouch = arr.indexOf(btn)
app.ShowPopup(list[indexTouch])
}
function OnStart() {
Example()
}</pre>
[code=javascript]
function OnStart() {
var lay = app.CreateLayout( "Linear", "VCenter,FillXY" );
var lst = [0, 1, 2, 3];
for(var i in lst) {
var btn = app.CreateButton("button" + lst[i], 0.5, 0.1);
btn.SetOnTouch(OnTouch);
btn.ID = i;
lay.AddChild(btn);
}
app.AddLayout(lay);
}
function OnTouch() {
var id = this.ID;
var text = this.GetText();
app.ShowPopup('I'm ' + text + ', ID = ' +id);
}</pre>
[code=javascript]if(app.IsFolder("/sdcard/DroidScript"))
app.ShowPopup("It's a folder");</pre>
[code=javascript]function inputDigital(callback, input_type, title, default_value) {
input_params = {
sum: String(default_value || 0),
maxvalue: 99999999.99,
round: 2,
callback: callback,
flag_exit: false
}
var mode = Number(input_type!="float")
layInputDigital = app.CreateLayout("linear", "FillXY");
layInputDigital.SetBackColor("#dd111111");
layInputDigital.SetVisibility("Hide")
var keys = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, ".", "⇦", "C", "↺", "Ok"];
var txt_title = app.CreateText(title, 0.9, 0.45, "Multiline");
txt_title .SetTextSize(12);
txt_title .SetTextColor("#dddddd");
layInputDigital.AddChild(txt_title);
input_params.txtSum = app.CreateText(input_params.sum, 0.9, 0.1);
input_params.txtSum.SetTextSize(30);
input_params.txtSum.SetTextColor("#aaaaaa");
input_params.txtSum.SetMargins(0, 0, 0, 0.01);
layInputDigital.AddChild(input_params.txtSum);
var lay1st = app.CreateLayout("linear", "Horizontal");
for( i=0; i<4; i++) AddButton(lay1st, keys[i], input_type);
layInputDigital.AddChild(lay1st);
var lay2nd = app.CreateLayout("linear", "Horizontal");
for(i=4; i<8; i++) AddButton(lay2nd, keys[i], input_type);
layInputDigital.AddChild(lay2nd);
var lay3rd = app.CreateLayout("linear", "Horizontal");
for(i=8; i<([12, 13][mode]); i++) {
if (input_type != "float" && i == 10) i++;
AddButton(lay3rd, keys[i], input_type) }
layInputDigital.AddChild(lay3rd);
var lay4rd = app.CreateLayout("linear", "Horizontal");
for(i= (input_type == "float") ? 12 : 13 ; i<15; i++) {
AddButton(lay4rd, keys[i], input_type) }
layInputDigital.AddChild(lay4rd);
app.AddLayout(layInputDigital);
layInputDigital.Animate("SlideFromRight");
app.EnableBackKey(false);
}
function AddButton(lay, name, input_type)
{
if(name == "Ok") w = (input_type == "float") ? 0.45 : 0.675;
else w = 0.225;
var btn = app.CreateButton(name, w, 0.1, "Gray");
btn.SetOnTouch(btns_OnTouch);
btn.SetTextSize(20);
lay.AddChild(btn);
}
function btns_OnTouch() {
var btn = app.GetLastButton();
var txt = btn.GetText();
if(txt == "Ok") {
input_params.callback(input_params.sum);
input_params.flag_exit = true
layInputDigital.Animate("SlideToRight") }
else if(txt == "↺") {
layInputDigital.Animate("SlideToRight");
input_params.flag_exit = true }
else if(txt == "C") input_params.sum = "0";
else if(txt == "⇦") {
input_params.sum = input_params.sum.slice(0, -1);
if (input_params.sum == "") input_params.sum = "0" }
else if(txt == "." && input_params.sum.indexOf(".") != -1) return;
else {
if (input_params.sum == "0" && txt != ".") input_params.sum = "";
else if (eval(input_params.sum + txt) > input_params.maxvalue) return;
else if (input_params.sum.slice(input_params.sum.indexOf("."), -1).length == input_params.round) return;
input_params.sum += txt }
input_params.txtSum.SetText(input_params.sum);
}
// example
function Example() {
layMain = app.CreateLayout("Linear", "FillXY");
arr = []
for(i=0; i<6; i++) {
arr[i] = app.CreateButton("0", 0.6, 0.1, "gray");
arr[i].SetOnTouch(btn_OnTouch);
layMain.AddChild(arr[i]) }
app.AddLayout(layMain)
}
function btn_OnTouch() {
var btn = app.GetLastButton();
indexTouch = arr.indexOf(btn) //индекс нажатой кн.
title = "Введите значение для кнопки " + (indexTouch+1)
inputDigital(btnSetText, "float", title, btn.GetText()) // вызов ф-ции ввода
}
function btnSetText(text) {
arr[indexTouch].SetText(text)
}
function OnBack() {
if (input_params.flag_exit == true) app.Exit();
else {
layInputDigital.Animate("SlideToRight");
input_params.flag_exit = true }
}
function OnStart() {
Example()
}</pre>