LordZoltan / PagerSlidingTabStrip.Net

Port of Java project of the same name by Andreas Stütz (https://github.com/astuetz/PagerSlidingTabStrip) for Xamarin.Android, written in C# .Net.
Apache License 2.0
17 stars 8 forks source link

Build fails when V7 support library component is also in project #1

Closed LordZoltan closed 10 years ago

LordZoltan commented 10 years ago

If you install this component into a project that also references Xamarin's Android Support Library v7 AppCompat (and possibly the the GridLayout one too), then your project's build will fail due to a conflicting stylable attribute name being defined in the attributes that are imported from this.

The build errors will be something like this:

[$projectfolder]\obj\[debug|release]\__library_projects__\PagerSlidingTabStrip\
 library_project_imports\res\attrs.xml: error : Attribute "dividerPadding" has 
 already been defined

With a second one saying Attribute "textAllCaps" has already been defined.

The only way I can see of fixing this will be either to change the names of the offending attributes (thus breaking any existing projects that use PagerSlidingTabStrip), or to make a build of the project specifically for when v7 of the support library is being referenced.

jamesottaway commented 10 years ago

Is this as simple as renaming the dividerPadding attribute in this library? Or do you have a different idea?

The conflict with AppCompat has bit me in my current project, so I've had to temporarily vendor your library and change the attribute myself.

I'm happy to submit a PR if it's as simple as renaming the attribute in question.

LordZoltan commented 10 years ago

Hi James - yes, renaming the attributes will be the only really workable solution as far as I can see - the only reason I didn't apply this yet was because it would break any builds that are out there.

That said - such a breaking change could simply be mitigated with a major or dot release on the nuget package, so it does need to be done.

I'm about to switch jobs (perm to contract), and am about to lose my Xamarin environment for a month or two, so I'd be really pleased if you were to submit a PR; I'd action it straight away.

Cheers,

Andras

jamesottaway commented 10 years ago

Yeah, I'd agree with the major version number bump to signal the breaking change.

What should dividerPadding be renamed to?

I should be able to do this over the weekend, but I'll let you make a decision on the new name.

LordZoltan commented 10 years ago

Hi James,

How about tabDividerPadding? Some of the other attributes have the tab prefix so I think that should be okay.

Really appreciate your input, James

Andras