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
[TIMOB-17964] Add custom error message for wrong theme used. #9396
Conversation
try { | ||
this.setSupportActionBar(((Toolbar) ((TiToolbarProxy) activityProxy.getProperty(TiC.PROPERTY_SUPPORT_TOOLBAR)).getToolbarInstance())); | ||
} catch (RuntimeException e) { | ||
Log.e(TAG, customToolbarExceptionMessage); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the error message will only be used once, it's best to just define it here
Log.e(TAG, "Attempting to use Toolbar as ActionBar without disabling the default ActionBar in the current theme.\n" +
"You must set 'windowActionBar' to false in your current theme. Or use one of the following themes:\n" +
"[Theme.Titanium, Theme.AppCompat.Translucent.NoTitleBar, Theme.AppCompat.NoTitleBar]\n" +
"Which have ActionBar disabled by default.");
I have also re-worded it 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do a list of theme instead of []? :-)
Remove variable.
@garymathews , @hansemannn Updated PR. |
Generated by 🚫 dangerJS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR: Pass
JIRA: https://jira.appcelerator.org/browse/TIMOB-17964
Description:
Show a custom error message whenever a theme without disabled ActionBar is used with Toolbar acting as ActionBar.