Skip to content

Commit

Permalink
Merge pull request #13 from akansha-maheshwari-axway/MOD-2583
Browse files Browse the repository at this point in the history
fix(android) : [MOD-2583] fix crypto module android example
  • Loading branch information
ssjsamir authored May 1, 2020
2 parents c8bc568 + 887047a commit ffbf646
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions android/example/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var App = {
Ti.API.warn('Trying to load an object that does not exist in the App namespace');
return false;
} else if (App[type][name] == null) {
Ti.include(type.toLowerCase() + '/' + name + '.js');
require(type.toLowerCase() + '/' + name);
Ti.API.info(type + ' ' + name + ' loaded');
return new App[type][name](params);
} else {
Expand All @@ -16,11 +16,13 @@ var App = {
}
}
};
global.App = App;

// Load the crypto modules
var Crypto = require('ti.crypto');
global.Crypto = Crypto;

Ti.include('ui.js');
Ti.include('test.js');
require('./ui');
require('./test');

App.UI.createAppWindow().open();
2 changes: 1 addition & 1 deletion android/example/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ App.UI = (function () {
var tableView = Ti.UI.createTableView({});
var cnt = algorithms.length;
for (var index = 0; index < cnt; index++) {
row = Ti.UI.createTableViewRow({ height: 45, layout:'vertical', hasChild:true });
var row = Ti.UI.createTableViewRow({ height: 45, layout:'vertical', hasChild:true });
row.add(Ti.UI.createLabel({ text:algorithms[index].title, top:0, left:4, height:Ti.UI.SIZE || 'auto', width:Ti.UI.SIZE || 'auto', font:{ fontSize:16, fontWeight:'bold' } }));
row.add(Ti.UI.createLabel({ text:algorithms[index].subTitle, top:0, left:4, height:Ti.UI.SIZE || 'auto', width:Ti.UI.SIZE || 'auto', font:{ fontSize:12 } }));
tableView.appendRow(row);
Expand Down

0 comments on commit ffbf646

Please sign in to comment.