The widget that I have is working on other xml files..except for one... The process goes like this...There's a view that when clicked, a window will open..
<Alloy>
<View class="vertical hsize">
<View class="hsize">
<Require src="actionbar" type="widget" />
</View>
<ScrollView class="container vertical whitebg">
<View class="downloadRowContainer horizontal">
<View class="downloadRow horizontal">
<View id="itemDl" onClick="viewItem" class="downloadItem graybg" />
<View class="divider" />
<View class="downloadItem graybg" />
</View>
</View>
<View class="downloadRowContainer horizontal">
<View class="downloadRow horizontal">
<View class="downloadItem graybg" />
<View class="divider" />
<View class="downloadItem graybg" />
</View>
</View>
</ScrollView>
</View>
</Alloy>
Here's the js:
function viewItem(e){
var showItem = Alloy.createController('viewdl').getView().open();
}
It works it opens viewdl.xml but the widget ain't working anymore on viewdl.xml alone.Any idea why? Here's viewdl.xml(viewdl.js is blank):
<Alloy><Window class="vertical">
<View class="vertical hsize">
<View class="hsize"><Require src="actionbar" type="widget"/></View>
<ScrollView class="container vertical blackbg">
<View class="imgContainer"></View>
<View class="division"></View>
<Label>DOWNLOAD THIS WALLPAPER</Label>
</ScrollView>
</View></Window></Alloy>
viewdl.xml
andviewdl.js
. Also what error do you get in console. – turtleviewdl.xml
code. Also can you provide link/info of youractionbar
widget. A quick try could be usevar showItem = Alloy.createController('viewdl').getView().open({fullscreen:false});
– turtlewindow
becauseopen
method is not available forview
. You can export the content of the xml and add it to currentwindow
orview
like$.myCurrentView.add(Alloy.createController('viewdl').getView());
– turtle