Skip to content

Instantly share code, notes, and snippets.

@tonylukasavage
Created August 30, 2012 14:36
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonylukasavage/3529762 to your computer and use it in GitHub Desktop.
Save tonylukasavage/3529762 to your computer and use it in GitHub Desktop.
Alloy "platform" attribute
<Alloy>
<Window>
<!-- all platforms -->
<View/>
<!-- only on ios will this element, and all its subviews, appear -->
<View platform="ios">
<View/>
</View>
<!-- only on android -->
<View platform="android"/>
<!-- only on mobileweb -->
<View platform="mobileweb"/>
<!-- only on ios and android -->
<View platform="ios,android"/>
<!-- on all platforms that are not android -->
<View platform="!android"/>
</Window>
</Alloy>
@aaronksaunders
Copy link

this is very cool

@vinothbabu
Copy link

This is super cool... any plans for windows...

@clemblanco
Copy link

Awesome! Is it an Alloy stock feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment