Comments (15)
Can you add more information regarding this conflict?
from seekbarrangedview.
I'm sorry, but i use other library.
from seekbarrangedview.
Perhaps the fields from the attrs file were dealt with with another library.
from seekbarrangedview.
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.
Of course.
from seekbarrangedview.
@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.
@LyalinAnton any feedback you want to share?
I'll close this report since almost 30 days have passed after the latest release.
from seekbarrangedview.
Unfortunately I do not have time to check, so you can close.
from seekbarrangedview.
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.
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.
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" />
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.
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.
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.
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.
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)
- Step size alteration? HOT 4
- Thumb overlap issue HOT 1
- CHANGELOG HOT 2
- Block overlap of Min and Max value at certain place HOT 1
- set min and max value from program HOT 2
- 1.0.3 doesn't reference as 1.0.2? HOT 1
- Current min max
- Cast exception on onSaveInstanceState and onRestoreInstanceState HOT 1
- NullPointerException HOT 2
- Unable to use XML drawables for thumbs HOT 2
- No virtual method getColor() HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from seekbarrangedview.