Git Product home page Git Product logo

Comments (15)

GuilhE avatar GuilhE commented on May 29, 2024

Can you add more information regarding this conflict?

from seekbarrangedview.

LyalinAnton avatar LyalinAnton commented on May 29, 2024

I'm sorry, but i use other library.

from seekbarrangedview.

LyalinAnton avatar LyalinAnton commented on May 29, 2024

Perhaps the fields from the attrs file were dealt with with another library.

from seekbarrangedview.

GuilhE avatar GuilhE commented on May 29, 2024

I've run a simple test and yes, this error happens every time custom views share the same attr name. Let me try to find a good final (to avoid picking a possible chosen name) solution and I'll update a new version.

from seekbarrangedview.

LyalinAnton avatar LyalinAnton commented on May 29, 2024

Of course.

from seekbarrangedview.

GuilhE avatar GuilhE commented on May 29, 2024

@LyalinAnton just uploaded a new version (2.0.3) to Maven. When possible, give it a try and tell me how it went.
Thanks!

from seekbarrangedview.

GuilhE avatar GuilhE commented on May 29, 2024

@LyalinAnton any feedback you want to share?
I'll close this report since almost 30 days have passed after the latest release.

from seekbarrangedview.

LyalinAnton avatar LyalinAnton commented on May 29, 2024

Unfortunately I do not have time to check, so you can close.

from seekbarrangedview.

tulang3587 avatar tulang3587 commented on May 29, 2024

This is still happening on v2.0.3, probably conflicts with the AndroidX Preference library.
I think it would be better if you change the attribute names, maybe add some prefixes?

from seekbarrangedview.

GuilhE avatar GuilhE commented on May 29, 2024

Hello @tulang3587 ,
I'm trying to run some tests here and I'll get back to you asap.
Adding prefixes will be my last solution.

from seekbarrangedview.

GuilhE avatar GuilhE commented on May 29, 2024

So after running some test I came to conclusion that my approach of configuring attrs.xml it's correct:

I've imported 3 libs that have common attributes:

    implementation("com.github.guilhe:seekbar-ranged-view:2.0.5")
    implementation("com.github.guilhe:circular-progress-view:1.4.2")
    implementation("com.github.guilhe:quantity-picker-view:1.2.4")

I've created a layout:

        <com.github.guilhe.views.SeekBarRangedView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:max="10"
            app:min="1" />

        <com.github.guilhe.views.CircularProgressView
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:layout_marginTop="10dp"
            app:backgroundColor="@android:color/holo_red_dark"
            app:max="50" />

        <com.github.guilhe.views.QuantityPickerView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            app:isOpen="true"
            app:max="30"
            app:min="10" />

The result:
Screenshot 2020-04-25 at 01 14 24

So, as you can see, probably the conflict is with another author's lib, not this one. Can you show me the console output error?

from seekbarrangedview.

tulang3587 avatar tulang3587 commented on May 29, 2024
Android resource compilation failed
C:\...\.gradle\caches\transforms-2\files-2.1\13ca8ebc10f8ce114131b64cbc3ccd87\preference-1.1.0\res\values\values.xml:425:5-446:25: AAPT: error: duplicate value for resource 'attr/min' with config ''.
    
C:\...\.gradle\caches\transforms-2\files-2.1\13ca8ebc10f8ce114131b64cbc3ccd87\preference-1.1.0\res\values\values.xml:425:5-446:25: AAPT: error: resource previously defined here.
    
D:\...\build\intermediates\incremental\mergeMockDebugResources\merged.dir\values\values.xml: AAPT: error: file failed to compile.

When I clicked on the values.xml error, it's showing the SeekBarPreference styleable on line 425:

<declare-styleable name="SeekBarPreference">
        <attr format="integer" name="min"/>
        <attr name="android:max"/>
        <attr name="android:layout"/>
        <!--Attribute controlling the amount to increment or decrement the seekbar when the user
        presses the arrow keys-->
        <attr format="integer" name="seekBarIncrement"/>
        <!-- Attribute indicating whether the slider within this preference can be adjusted, that is
        pressing left/right keys when this preference is focused will move the slider accordingly
        (e.g. inline adjustable preferences). False, if the slider within the preference is
        read-only and cannot be adjusted. By default, the seekbar is adjustable. -->
        <attr format="boolean" name="adjustable"/>
        <!-- Flag indicating whether the TextView next to the seekbar that shows the current seekbar
        value will be displayed. If true, the view is VISIBLE; if false, the view will be GONE.
        By default, this view is GONE. -->
        <attr format="boolean" name="showSeekBarValue"/>
        <!-- Flag indicating whether the SeekBarPreference should continuously save the Seekbar
        value while the Seekbar is being dragged. If true, the SeekBarPreference should continuously
        save the Seekbar value while it is being dragged. If false, the Seekbar value is only saved
        when released. By default, this boolean is false. -->
        <attr format="boolean" name="updatesContinuously"/>
    </declare-styleable>

And I am using androidx.preference:preference:1.1.0 on my project.

from seekbarrangedview.

GuilhE avatar GuilhE commented on May 29, 2024
dependencies {
    implementation("com.github.guilhe:seekbar-ranged-view:2.0.5")
    implementation("com.github.guilhe:circular-progress-view:1.4.2")
    implementation("com.github.guilhe:quantity-picker-view:1.2.4")
    implementation("androidx.preference:preference:1.1.1")
}

Gradle build finished in 1 m 41 s 351 ms

I'm not having that problem. Can you please do the following: File > Invalidate Caches / Restart... > Invalidate and Restart.
And give it another go?

I've also tried with this:

dependencies {
    implementation("com.github.guilhe:seekbar-ranged-view:2.0.3")
    implementation("androidx.preference:preference:1.1.0")
}

and it worked.

from seekbarrangedview.

tulang3587 avatar tulang3587 commented on May 29, 2024

Even after cleaning the project and invalidating caches, it still shows up as duplicate value for me.

I just cloned the library, renamed the attributes, and used it as a module instead.

from seekbarrangedview.

smoil-ali avatar smoil-ali commented on May 29, 2024

Even after cleaning the project and invalidating caches, it still shows up as duplicate value for me.

I just cloned the library, renamed the attributes, and used it as a module instead.

how did you add as module ,can you guide me...?

from seekbarrangedview.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.