You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function onItemTap(args) {
const index = args.index;
console.log(Second ListView item tap ${index});
}
exports.onItemTap = onItemTap;
// << list-view-create-code
function onTap(args) {
const page = args.object.page;
const vm = page.bindingContext;
// >> list-view-refresh
const listView = page.getViewById("listView");
page.bindingContext.myTitles.push({ title: new_note_title });
// Manually trigger the update so that the new color is shown.
listView.refresh();
// << list-view-refresh
Hello,
I was trying to get the user input from the text view. but it shows exception. please help me on this issue.
Full Code is here.
main-page.js
// >> list-view-create-code
const fromObject = require("tns-core-modules/data/observable").fromObject;
var view = require("tns-core-modules/ui/core/view");
var dialogs = require("tns-core-modules/ui/dialogs");
var new_note_title;
function onNavigatingTo(args) {
const page = args.object;
const vm = fromObject({
// Setting the listview binding source
myTitles: [
{ title: "going to gym" },
{ title: "electricity bill due date" },
{ title: "need to buy one book" },
{ title: "tank fill petrol" },
{ title: "insurance premium bill" },
{ title: "lunch bag" }
]
});
page.bindingContext = vm;
}
exports.onNavigatingTo = onNavigatingTo;
function onListViewLoaded(args) {
const listView = args.object;
}
exports.onListViewLoaded = onListViewLoaded;
function onItemTap(args) {
const index = args.index;
console.log(
Second ListView item tap ${index}
);}
exports.onItemTap = onItemTap;
// << list-view-create-code
function onTap(args) {
}
exports.onTap = onTap;
function newNote(args){
}
exports.newNote = newNote;
add-item.js
const fromObject = require("tns-core-modules/data/observable").fromObject;
exports.onPageLoaded = function(args) {
}
function onCreateTap(args) {
const button = args.object;
const page = button.page;
const vm = page.bindingContext;
const editState = vm.get("editState");
console.log(editState);
page.frame.navigate("main-page");
}
exports.onCreateTap = onCreateTap;
add-item.xml
The text was updated successfully, but these errors were encountered: