Coder Social home page Coder Social logo

Comments (4)

u3amar avatar u3amar commented on August 17, 2024

I'm also getting this error in Eclipse.

from flatui.

u3amar avatar u3amar commented on August 17, 2024

I was able to fix this problem by editing the Attributes class. I changed the setThemeSilent and setTheme methods and added a method:

public void setTheme(int theme, Resources resources)
{
    this.theme = theme;

    try
    {
        colors = resources.getIntArray(theme);
    }
    catch (NotFoundException e)
    {
        checkNullColors();
    }

    attributeChangeListener.onThemeChange();
}

public void setThemeSilent(int customTheme, Resources resources)
{
    this.theme = customTheme;

    try
    {
        colors = resources.getIntArray(customTheme);
    }
    catch (NotFoundException e)
    {
        checkNullColors();
    }
}

private void checkNullColors()
{
    if (colors == null)
    {
        colors = new int[4];
        colors[0] = Color.parseColor("#ad843d");
        colors[1] = Color.parseColor("#d4a14a");
        colors[2] = Color.parseColor("#fbbf58");
        colors[3] = Color.parseColor("#fae8c8");
    }
}

When viewing the UI through the UI builder, Eclipse isn't able to find the request integer array using the resources, so it throws a NotFoundException. Whenever this happens, we make sure the colors are being set using the default color scheme for the sand theme. This is not an ideal solution because it means we can't view other themes in the UI builder, but it does allow us to edit the positions of elements on screen.

from flatui.

eluleci avatar eluleci commented on August 17, 2024

I fixed this issue but didn't update the repository yet. Thanks @u3amar for suggestion. I'll close the issue and comment when the repo is updated.

from flatui.

eluleci avatar eluleci commented on August 17, 2024

This issue is fixed with version 2.0.1

from flatui.

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.