Giter Site home page Giter Site logo

Comments (7)

LarsWerkman avatar LarsWerkman commented on August 20, 2024

Hi @JKlessens which version do you use 1.3?

from holocolorpicker.

LarsWerkman avatar LarsWerkman commented on August 20, 2024

Also could you post the whole stackstrace in somethint like pastebin or in a comment

from holocolorpicker.

JKlessens avatar JKlessens commented on August 20, 2024

Hi, yeah I downloaded the latest master earlier today, which according to the AndroidManifest is 1.3.

Sadly I have no idea yet how to view the whole stacktrace in android studio. Is that just the LogCat window when debugging?

And lastly, I have been testing with it some more today and its not just adding the bars to the picker which causes the error. I think it is every call in the picker, seeing as the following code also crashes, when setting the onColorChangedListener.

Dialog d = new Dialog(this); d.setTitle("Color Picker:"); d.setContentView(R.layout.dialog_colorpicker);
    ColorPicker picker = (ColorPicker) findViewById(R.id.picker);

    picker.setOnColorChangedListener(new ColorPicker.OnColorChangedListener()
    {
        @Override
        public void onColorChanged(int i)
        {
            Toast.makeText(MainActivity.this, Color.red(i) + "," + Color.green(i) + "," + Color.blue(i) , Toast.LENGTH_LONG);
        }
    });

And even this crashes, on the toast.maketext:

Dialog d = new Dialog(this);
d.setTitle("Color Picker:");
d.setContentView(R.layout.dialog_colorpicker);

    ColorPicker picker = (ColorPicker) findViewById(R.id.picker);
    d.show();
    Toast.makeText(MainActivity.this, Color.red(picker.getColor()) + "," + Color.green(picker.getColor()) + "," + Color.blue(picker.getColor()) , Toast.LENGTH_LONG);

The only thing that does seem to work is only showing the dialog with the colorpicker in it and then never accessing it again.

I am now testing adding your code files to my project instead of adding them as a library module. But that also seems to crash at the same point.

(Just wondering, but could it be a problem with compiling it with sdk 19?)

Thank you for the help.

from holocolorpicker.

LarsWerkman avatar LarsWerkman commented on August 20, 2024

Have you tried inflating something else in the dialog like a button and checking if that works, i am maybe thinking that i could be an inflation problem. But i would really need to see a Log for that

from holocolorpicker.

JKlessens avatar JKlessens commented on August 20, 2024

Yeah, I did have some inflation errors, I think, when I was experimenting with your code a bit more last week, trying to build it as a .jar and adding it, adding it as code straight into my project, etc, but it all crashed as soon as I tried to access anything in the ColorPicker. Ultimately I had to decide to go with another color picker library (https://github.com/attenzione/android-ColorPickerPreference) for now. Although I do like yours better, but sadly I don't have the time right now to spend a lot of time on figuring out how to make it work.

If time permits in the next few weeks, I will fiddle around with it some more. Maybe add the layout xml to the ColorPicker module, instead of my main project and see if that works. That's how the other library works as well. If I get it to work in Android Studio I'll let you know!

from holocolorpicker.

LarsWerkman avatar LarsWerkman commented on August 20, 2024

Okay for now i will close the issue for now

from holocolorpicker.

timkoers avatar timkoers commented on August 20, 2024

I got the Inflate Exception from line 147 (wich is reffering to your library using com.larswerkman.holocolorpicker.Colorpicker)
How do I fix this?

from holocolorpicker.

Related Issues (20)

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.