Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on onHomeIconItemSelected #122

Open
rethinkautismdev opened this issue Aug 4, 2017 · 0 comments
Open

Error on onHomeIconItemSelected #122

rethinkautismdev opened this issue Aug 4, 2017 · 0 comments

Comments

@rethinkautismdev
Copy link

Hello,
I am using com.alcoapps.actionbarextras(1.7.3) module with Titanium SDK 6.1.1GA and I am getting error (attached file). When I use this module with SDK 6.0.1GA, it is working fine. Could you please let me know, what to do. Here is my cosde

LG - 6.1.1GA- Back Button- ERROR.docx
var actionBarModule = require('com.alcoapps.actionbarextras');
self.addEventListener('open', function(){
// console.log(" in session.js self.addEventListener - open ");
//runActivityTracker();
if (rt.isAndroid) {
actionBarModule.setDisableIcon(false);
actionBarModule.setTitle({
text: '',
font: {
fontSize: text_font_size_h4,
fontFamily: 'OpenSans-Semibold'
},
color: color_val_blue1
});
actionBarModule.setTitleFont('OpenSans-Semibold');
actionBarModule.setBackgroundColor(color_val_gray);
var activity = self.getActivity();
if (activity) {
var actionBar = activity.getActionBar();
activity.onCreateOptionsMenu = function(e) {
var menu = e.menu, menuFinishButton;
// console.log(" activity.onCreateOptionsMenu " + JSON.stringify(e));
menu.clear();
menuFinishButton = menu.add({
title: 'Finish',
showAsAction: Ti.Android.SHOW_AS_ACTION_ALWAYS
});
menuFinishButton.clickTime = null;
menuFinishButton.addEventListener('click',finishMethod);
};
activity.actionBar.displayHomeAsUp = true;
activity.actionBar.onHomeIconItemSelected = function() {
//console.log( " in session activity.actionBar.onHomeIconItemSelected ");
self.fireEvent('CloseManual');
self.close();
};
activity.invalidateOptionsMenu();
}
}
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant