Skip to content

Commit

Permalink
do not have the app in full screen
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierlacot committed Mar 14, 2011
1 parent b270074 commit bda903d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 23 deletions.
4 changes: 0 additions & 4 deletions Resources/js/views/decode.js
@@ -1,10 +1,6 @@
Ti.include('../../redux.js');
var win = Titanium.UI.currentWindow;

if (Titanium.Platform.name != 'android') {
win.hideNavBar(); // full screen app
}

// label and first field
var l1a = Titanium.UI.createLabel({
text:'Short url to decode*',
Expand Down
28 changes: 15 additions & 13 deletions Resources/js/views/encode.js
@@ -1,11 +1,6 @@
Ti.include('../../redux.js');
var win = Titanium.UI.currentWindow;

if (Titanium.Platform.name != 'android') {
win.hideNavBar(); // full screen app
}


// label and first field
var l1 = Titanium.UI.createLabel({
text:'Paste a long url*',
Expand Down Expand Up @@ -124,21 +119,28 @@ Ti.App.addEventListener('xavcc.encode.result', function(event) {
// put the shortened url in the clipboard
Titanium.UI.Clipboard.setText(url);
}
if (Titanium.App.Properties.getBool('use_history', true)) {
info('using history');
}
if (!xavcc.url.has(url)) {
info('do not have the url in memory');
}

if (Titanium.App.Properties.getBool('use_history', true)) {
info('using history');
}

if (!xavcc.url.has(url)) {
Titanium.API.log('info', 'do not have the url in memory');
}

if (Titanium.App.Properties.getBool('use_history', true) && !xavcc.url.has(url)) {
// save in the local database
info('saving url ' + url);
Titanium.API.log('info', 'saving url ' + url);
var longurl = xavcc.trim(tf1.value);
xavcc.url.save(longurl, url);
}
} else {
// something went wrong : display an alert message
alert(event.result);
if (event.result) {
alert(event.result);
} else {
alert('Something went wrong, please check that you are connected to internet. Apologies for the inconvenience.');
}
}
});

Expand Down
12 changes: 6 additions & 6 deletions tiapp.xml
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<ti:app xmlns:ti="http://ti.appcelerator.org">
<id>com.xavcc.mobile</id>
<name>URL shortener</name>
<version>1.0.2</version>
<id>com.xavierlacot.xavcc</id>
<name>xavccMobileApp</name>
<version>2.0.0</version>
<publisher>xav.cc</publisher>
<url>http://xav.cc/</url>
<description>a mobile client for the url shortener xav.cc</description>
<copyright>2011 by xav.cc</copyright>
<icon>images/appicon.png</icon>
<icon>default_app_logo.png</icon>
<persistent-wifi>false</persistent-wifi>
<prerendered-icon>false</prerendered-icon>
<statusbar-style>default</statusbar-style>
<statusbar-hidden>true</statusbar-hidden>
<statusbar-hidden>false</statusbar-hidden>
<fullscreen>false</fullscreen>
<navbar-hidden>false</navbar-hidden>
<analytics>false</analytics>
Expand All @@ -33,4 +33,4 @@
<activity android:name=".xavccMobileActivity" android:label="xavccMobileApp" android:screenOrientation="portrait" />
</manifest>
</android>
</ti:app>
</ti:app>

0 comments on commit bda903d

Please sign in to comment.