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-18062] iOS: AttributedString Parity with Android #6409

Closed
wants to merge 3 commits into from

Conversation

cheekiatng
Copy link
Contributor

Jira: https://jira.appcelerator.org/browse/TIMOB-18062

iOS deprecation of Titanium.UI.IOS.AttributedString in favor of Titanium.UI.AttributedString. Pull request include Android support for AttributedString from pull request #6358, which will be closed once this PR is reviewed and merged.

Includes fix for font property in AttributedString, where fontsize was not working.

@@ -0,0 +1,98 @@
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2013 by Appcelerator, Inc. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

2014

@pingwang2011
Copy link
Contributor

If some duplicate properties are set, eg. "text" / "font" / "backgroundColor" and "text" / "font" / "backgroundColor" inside the attributedString, which one will be respected?

@ashcoding
Copy link
Contributor

I'm addressing some of the issues of this PR in #6463

@ashcoding
Copy link
Contributor

For the question: "If some duplicate properties are set, eg. "text" / "font" / "backgroundColor" and "text" / "font" / "backgroundColor" inside the attributedString, which one will be respected?"

In Android, the if you have for eg:

        // Sets a background color
        {
            type: Ti.UI.ATTRIBUTE_BACKGROUND_COLOR,
            value: "red",
            range: [text.indexOf('Appcelerator'), ('Appcelerator').length]
        },
                // Sets a background color
        {
            type: Ti.UI.ATTRIBUTE_BACKGROUND_COLOR,
            value: "blue",
            range: [text.indexOf('Appcelerator'), ('Appcelerator').length]
        },

The property that comes later will be applied over.

@ashcoding
Copy link
Contributor

Closing this PR in favor of #6463
that contains Android modifications and documentation fixes on top of this PR.

@ashcoding ashcoding closed this Dec 11, 2014
@pingwang2011
Copy link
Contributor

@ashcoding, you don't need to close this PR. You can just commit the update and push it to the branch.
Because you closed this PR, you lost all my comments.

@ashcoding
Copy link
Contributor

Sorry about that!

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

Successfully merging this pull request may close these issues.

None yet

3 participants