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

dividerPadding and textAllCaps #5

Closed
ricardoalcocer opened this issue Jul 15, 2014 · 13 comments
Closed

dividerPadding and textAllCaps #5

ricardoalcocer opened this issue Jul 15, 2014 · 13 comments

Comments

@ricardoalcocer
Copy link
Contributor

I'm getting a packaging error when trying to compile an app using Titanium 3.3.0.RC.

[ERROR] Failed to package application:
[ERROR]
[ERROR] /Users/ralcocer/Dropbox/Work/Manning/2014/code/ch4/TiConference/build/android/res/values/attrs.xml:9: error: Attribute "dividerPadding" has already been defined
[ERROR] /Users/ralcocer/Dropbox/Work/Manning/2014/code/ch4/TiConference/build/android/res/values/attrs.xml:14: error: Attribute "textAllCaps" has already been defined

Any ideas?

@ghahramani
Copy link
Owner

You should define attributes only once. Please look at your code and if you define textAllCaps and deviderPadding more than once remove it then try again.

@ricardoalcocer
Copy link
Contributor Author

Yeah, that's the thing, I'm not defining anything like that. Could it be related to the fact that Titanium 3.3.0 now uses AppCompat?

@ghahramani
Copy link
Owner

I don't think so. Can you paste here your compiled attrs.xml?

@ricardoalcocer
Copy link
Contributor Author

Sure. Here:

<?xml version="1.0" encoding="UTF-8"?>
<resources>
    <declare-styleable name="PagerSlidingTabStrip">
        <attr name="indicatorColor" format="color"/>
        <attr name="underlineColor" format="color"/>
        <attr name="dividerColor" format="color"/>
        <attr name="indicatorHeight" format="dimension"/>
        <attr name="underlineHeight" format="dimension"/>
        <attr name="dividerPadding" format="dimension"/>
        <attr name="tabPaddingLeftRight" format="dimension"/>
        <attr name="scrollOffset" format="dimension"/>
        <attr name="tabBackground" format="reference"/>
        <attr name="shouldExpand" format="boolean"/>
        <attr name="textAllCaps" format="boolean"/>
    </declare-styleable>
</resources>

@ricardoalcocer
Copy link
Contributor Author

I was able to pack the app properly with 3.2.0.GA, so it appears to be something with 3.3.0.RC.

@ricardoalcocer
Copy link
Contributor Author

Does this here means that AppCompat is already defining those values?

@ghahramani
Copy link
Owner

Maybe, I didn't use AppCompact with this library. And I didn't try this with even 3.2.0.GA. I used 3.1.3.GA.
Can you remove these attributes from attrs.xml and compile again and see if you can compile successfully?

@ricardoalcocer
Copy link
Contributor Author

I don't think I can remove them...the attr.xml is auto-generated at build
time, AFAIK. Do you know of a way?

On Thu, Jul 17, 2014 at 8:01 PM, dreamlearn notifications@github.com
wrote:

Maybe, I didn't use AppCompact with this library. And I didn't try this
with even 3.2.0.GA. I used 3.1.3.GA.
Can you remove these attributes from attrs.xml and compile again and see
if you can compile successfully?


Reply to this email directly or view it on GitHub
#5 (comment).

@ghahramani
Copy link
Owner

Yes, You can. You have to remove the attributes from viewpager in follow path:
platform->android->res->values->attrs.xml

this file is in follow url in my repository:
https://github.com/dreamlearn/viewpager/blob/master/platform/android/res/values/attrs.xml

Let me know if it works.

@ricardoalcocer
Copy link
Contributor Author

Hi. I can confirm that it works with Titanium 3.3.0 by changing the modules attr.xml like this:

<?xml version="1.0" encoding="utf-8"?>
<resources>

    <declare-styleable name="PagerSlidingTabStrip">
        <attr name="indicatorColor" format="color" />
        <attr name="underlineColor" format="color" />
        <attr name="dividerColor" format="color" />
        <attr name="indicatorHeight" format="dimension" />
        <attr name="underlineHeight" format="dimension" />
        <!--<attr name="dividerPadding" format="dimension" />-->
        <attr name="tabPaddingLeftRight" format="dimension" />
        <attr name="scrollOffset" format="dimension" />
        <attr name="tabBackground" format="reference" />
        <attr name="shouldExpand" format="boolean" />
        <!--<attr name="textAllCaps" format="boolean" />-->
    </declare-styleable>

</resources>

Naturally the values can be removed altogether.

@ghahramani
Copy link
Owner

I glad to hear that. I want to close this issue so did your issue solve?

@ricardoalcocer
Copy link
Contributor Author

Yeah, fixed and closing. Thanks.

@ricardoalcocer
Copy link
Contributor Author

When you have a chance, write me an email to alco [at] ricardoalcocer . com . Have something to share with you about this module.

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

2 participants