Creating a Custom Dialog View


Hi i am new to native script development shifted from Android to this.

I have a search bar in my home page when i click on it custom dialog should open to select the cities when i selects the city(Intent in android) Should pass to next page

Right now when i click on the search bar. My keyboard is appearing. So I need to hide the keyboard and make the Custom Dialog to appear

Nagendra Bhat


Hey @nagendrambhat,

You can set your searchbar as non editable.

<TextField [(ngModel)]="category" (tap)="selectCities()" editable="false"></TextField>

Then onTap event you may call method which will give you custom dialog.

    // message: "Your message",
    cancelButtonText: "Clear",
    actions: ["New York", "California"]
}).then(result => {
    console.log("Dialog result: " + result);
    if(result == "New York"){
    }else if(result == "California"){