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

[TIMOB-17964] Add custom error message for wrong theme used. #9396

Merged
merged 14 commits into from May 19, 2018

Conversation

ypbnv
Copy link
Contributor

@ypbnv ypbnv commented Sep 4, 2017

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.

try {
this.setSupportActionBar(((Toolbar) ((TiToolbarProxy) activityProxy.getProperty(TiC.PROPERTY_SUPPORT_TOOLBAR)).getToolbarInstance()));
} catch (RuntimeException e) {
Log.e(TAG, customToolbarExceptionMessage);
Copy link
Contributor

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 👍

Copy link
Collaborator

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 []? :-)

@ypbnv
Copy link
Contributor Author

ypbnv commented Sep 7, 2017

@garymathews , @hansemannn Updated PR.

@build build added the android label Nov 9, 2017
@hansemannn hansemannn removed their request for review November 9, 2017 14:33
@build build added the android label Nov 16, 2017
@sgtcoolguy sgtcoolguy modified the milestones: 7.0.0, 7.0.1, 7.1.0 Nov 30, 2017
@sgtcoolguy
Copy link
Contributor

@garymathews @jquick-axway ping

@build build added the android label Nov 30, 2017
@build build added the android label Jan 4, 2018
@build
Copy link
Contributor

build commented Feb 13, 2018

Messages
📖

💾 Here's the generated SDK zipfile.

Generated by 🚫 dangerJS

Copy link
Contributor

@jquick-axway jquick-axway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR: Pass

@build build added the android label Feb 20, 2018
@hansemannn hansemannn merged commit 1816325 into tidev:master May 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants