Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated anchor link and formatting

...

Code Block
titleapp/views/index.xml
linenumberstrue
languagexml
<Alloy>
    <Window>
        <View id="main" formFactor="handheld">
            <Label id="label">I'm a handheld!</Label>
        </View>        
        <View id="main" formFactor="tablet">
            <Label id="label">I'm a tablet!</Label>
        </View>        
        <View id="container" height="50" width="200" bottom="10" backgroundColor="#cdcdcd">
            <Label id="platformLabel" platform="android" formFactor="tablet">android tablet</Label>
            <Label id="platformLabel" platform="android" formFactor="handheld">android handheld</Label>
            <Label id="platformLabel" platform="ios" formFactor="tablet">ipad</Label>
            <Label id="platformLabel" platform="ios" formFactor="handheld">iphone</Label>
            <Label id="platformLabel" platform="mobileweb" formFactor="tablet">mobileweb tablet</Label>
            <Label id="platformLabel" platform="mobileweb" formFactor="handheld">mobileweb handheld</Label>
        </View>
    </Window>
</Alloy>

...

Code Block
titleapp/styles/index.tss
linenumberstrue
languagecss
"View[formFactor=handheld]": {
    backgroundColor:"blue"
}
"View[formFactor=tablet]": {
    backgroundColor:"red"
}

See

...

also