Skip to content

Commit

Permalink
[TIMOB-19055] Add windows phone support
Browse files Browse the repository at this point in the history
  • Loading branch information
garymathews committed Jul 14, 2015
1 parent 64675b6 commit 1cd93bc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
16 changes: 9 additions & 7 deletions Resources/ui/ApplicationWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ function isiOS7Plus()
return false;
}

var isWindows = (Ti.Platform.osname === "windowsphone" || Ti.Platform.osname === "windowsstore");

var iOS7 = isiOS7Plus();
var theTop = iOS7 ? 20 : 0;

Expand All @@ -37,10 +39,10 @@ var theTop = iOS7 ? 20 : 0;
top: theTop
});
var textfield = Ti.UI.createTextField({
height: '40dp',
top: '5dp',
height: isWindows ? '22.5dp' : '40dp',
top: isWindows ? '2.5dp' : '5dp',
left: '5dp',
right: '50dp',
right: isWindows ? '25dp' : '50dp',
style: Ti.UI.INPUT_BORDERSTYLE_ROUNDED,
hintText: 'Enter an address',
backgroundColor: '#fff',
Expand All @@ -52,9 +54,9 @@ var theTop = iOS7 ? 20 : 0;
fontSize: '20dp',
fontWeight: 'bold'
},
top: '5dp',
height: '40dp',
width: '40dp',
top: isWindows ? '2.5dp' : '5dp',
height: isWindows ? '20dp' : '40dp',
width: isWindows ? '20dp' : '40dp',
right: '5dp'
});
var mapview;
Expand All @@ -77,7 +79,7 @@ var theTop = iOS7 ? 20 : 0;
animate: true,
regionFit: true,
userLocation: false,
top: '70dp'
top: isWindows ? '40dp' : '70dp'
});

// Add initial annotation
Expand Down
4 changes: 3 additions & 1 deletion tiapp.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<ti:app xmlns:ti="http://ti.appcelerator.org">
<sdk-version>3.5.0.GA</sdk-version>
<sdk-version>4.1.0.GA</sdk-version>
<deployment-targets>
<target device="tizen">false</target>
<target device="mobileweb">true</target>
<target device="iphone">true</target>
<target device="ipad">true</target>
<target device="android">true</target>
<target device="blackberry">false</target>
<target device="windows">true</target>
</deployment-targets>
<guid>11111111-1111-1111-1111-111111111111</guid>
<id>com.appcelerator.sample.mapping</id>
<name>Geocoder</name>
<version>1.0</version>
Expand Down

0 comments on commit 1cd93bc

Please sign in to comment.