forked from appcelerator-developer-relations/appc-sample-rss
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmaster.xml
More file actions
46 lines (34 loc) · 1.43 KB
/
Copy pathmaster.xml
File metadata and controls
46 lines (34 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<Alloy>
<!-- create global instance of collection we'll bind -->
<Collection src="feed" />
<Window title="RSS Reader">
<!-- MobileWeb: Add rightNavButton for refresh -->
<RightNavButton platform="mobileweb">
<Button onClick="refresh">Refresh</Button>
</RightNavButton>
<!-- Android: Add MenuItem for refresh -->
<Menu platform="android">
<MenuItem icon="images/ic_action_action_autorenew.png" onClick="refresh" showAsAction="Ti.Android.SHOW_AS_ACTION_ALWAYS" />
</Menu>
<ListView platform="ios,android" defaultItemTemplate="template" onItemclick="select">
<!-- iOS RefreshControl -->
<RefreshControl platform="ios" id="refreshControl" onRefreshstart="refresh" />
<Templates>
<ItemTemplate name="template" class="item">
<Label bindId="title" class="text title" />
<Label bindId="subtitle" class="text subtitle" />
</ItemTemplate>
</Templates>
<!-- Alloy data-binding -->
<ListSection dataCollection="feed" dataTransform="transform">
<ListItem itemId="{guid}" image:image="{image}" title:text="{title}" subtitle:text="{pubDate}" />
</ListSection>
</ListView>
<TableView platform="mobileweb" dataCollection="feed" dataTransform="transform" onClick="select">
<TableViewRow class="item" itemId="{guid}">
<Label text="{title}" class="text title" />
<Label text="{pubDate}" class="text subtitle" />
</TableViewRow>
</TableView>
</Window>
</Alloy>