Herunterladen Inhalt Inhalt Diese Seite drucken

turck PD67-UNI-Serie Betriebsanleitung Seite 49

Rfid-handheld
Inhaltsverzeichnis

Werbung

position: "curve",
text: "@string/HomePageScanButton",
buttonColor: "@color/home_button_text",
buttonPressedColor: "@color/turck_yellow",
image: "@drawable/scan_button",
// when the user taps the button, this function will run. The function
// defined here will call the function called showScanPage.
click: function() { app.showScanPage(false); }
}),
// Another button like the one above. This one is for the read/write
// page of the app.
new
turck.ui.TextAndImageButton({
position: "curve",
text: "@string/HomePageReadWriteButton",
buttonColor: "@color/home_button_text",
buttonPressedColor: "@color/turck_yellow",
image: "@drawable/read_write_button",
// When this button is pressed, the below function is called. the
// function calls another function: showReadWritePage.
click: function() { app.showReadWritePage(); }
}),
// Settings button (long press displays additional setings)
new
turck.ui.TextAndImageButton({
position: "bottom.center",
text: "@string/HomePageSettingsButton",
buttonColor: "@color/home_button_text",
buttonPressedColor: "@color/turck_yellow",
image: "@drawable/settings_button",
// the click function works the same as the other two buttons above.
// in this case, when the button is clicked, the showSettingsPage
// function is called.
click: function() { app.showSettingsPage(false); },
// if you define a longClick function for a button gadget, it will be
// called if the user presses and holds the button for a couple
// seconds. the two buttons above could also have longClick functions,
// if you wanted them.
longClick: function() { app.showSettingsPage(true); }
}),
// Yet another button gadget. This one is for the barcode scanner page.
new
turck.ui.TextAndImageButton({
// the visibility parameter allows a gadget to only be shown under
// a certain condition. In this case, the button is only shown if
// the PDxx has a barcode reader. Using 'visibility: "hasHf"' will
// make a gadget appear only if the PDxx has an HF reader. You can
// also pass a JS boolean into the visibility parameter.
visibility: "hasBarcode",
position: [{type: "parent", ratio: 0.8, at: "center"},
{type: "parent", ratio: 0.65, at: "center"}],
text: "@string/HomePageBarcodeButton",
buttonColor: "@color/home_button_text",
buttonPressedColor: "@color/turck_yellow",
image: "@drawable/barcode_button",
click: function() { app.showBarcodePage(); }
}),
// The UhfHfSegmentedControl gadget allows the user to switch the PDxx
// between UHF and HF modes. You can use that 'visibility' parameter
// on any gadget except this one- the UhfHfSegmentedControl gadget
// ignores the 'visibility' parameter, and will automatically hide
// itself if the PDxx doesn't have HF capabilities.
new
turck.ui.UhfHfSegmentedControl({
position: [{type: "parent", ratio: 0.25, at: "center"},
{type: "parent", ratio: 0.32, at: "center"}]
})
]}));
// always put this at the end of the onLaunch function!
app.handleLaunchParameters(launchAction, launchPath, launchParameters);
}
// showSettingsPage was called by some of the 'click' functions on the gadget
// page. There is not much to customize with the settings page. It is set up
V01.00 | 2020/03
49

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis