Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Index.xml
- <TableViewRow height="Ti.UI.SIZE" id="row_audio">
- <View layout='vertical' id="audio_section" dataCollection="VideoG" height="Ti.UI.SIZE" top='10'>
- <Require src="Galerias/Componentes/Audio"></Require>
- </View>
- </TableViewRow>
- // Index.js
- var model = Alloy.createModel('VideoG',{});
- Alloy.Collections.VideoG.add(model);
- Alloy.Collections.VideoG.on("add remove", function(e){
- if(OS_IOS) $.row_audio.height = (Alloy.Collections.VideoG.length * 280) + "dp";
- if(OS_ANDROID) $.row_audio.height = (Alloy.Collections.VideoG.length * 240) + "dp";
- $.audio_section.height = (Alloy.Collections.VideoG.length != 0) ? Ti.UI.FILL: 0;
- (Alloy.Collections.VideoG.length != 0) ? $.audio_section.show(): $.audio_section.hide();
- });
- //Audio.xml
- <Alloy>
- <Collection src='Galeria'></Collection>
- <Collection src="VideoG"/>
- <View id="row_audio">
- <TextField id="autor" value="{autor}" hintText="Autor" onChange="actualizaAutor"></TextField>
- </View>
- </Alloy>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement