Modal Window Issues

You must Login before you can answer or comment on any questions.

Hi, I'm trying to use a modal window to set some options in a table view. Here is my code:

function doShowDialog()
{
    var optview = Titanium.UI.createTableView({
        backgroundColor: "#EEEEEE",
        headerTitle: 'Select Shows',
        borderColor:'#222',
        color: 'black'
    });
 
    doGetShowList(function(showList){
        Titanium.API.info("in doGetShowList");
        var showData = [];
        for (var i = 0; i < showList.length; i++) {
            showData.push({title: showList[i].name, hasCheck:true});    
        }
        optview.setData(showData);
    });
 
    optview.addEventListener('click', function(e)
    {
        var tmpData = e.rowData;
        tmpData.hasCheck = !tmpData.hasCheck;
        optview.updateRow(e.index,tmpData);
    });
 
    var pop = Ti.UI.createWindow({
        title: 'Select Shows',
        navBarHidden:false
    });
    pop.add(optview);
    pop.open({modal:true});
 
}
FYI. this function is called by a button click from a tab.

My primary issue is that the new window has no title bar NOR does the tablview (e.g. neither 'Select Shows' shows up) and the first row in the table view appears to be "chopped" off at the top.

What am I doing wrong?

Android w/ the 1.5 SDK.

— asked 2 years ago by Frank A
0 Comments

1 Answer

Accepted Answer

Thinking about this further, you may want to try and use the androidView property of an option dialogue - check the API docs for this property. I would whip up an example, but I am away from my laptop. Shoot kwhinnery at appcelerator a note if you're unable to figure out how to use that property - should be able to add a view to a dialogue, like your table view

— answered 2 years ago by Kevin Whinnery
answer permalink
1 Comment
  • Using the optionDialogue + androidView seems to have worked. Still not sure why the headerTitle on the tableview doesn't appear, but oh well. Thanks again!

    — commented 2 years ago by Frank A

Your Answer

Think you can help? Login to answer this question!