Giter Club home page Giter Club logo

Comments (11)

mehmetgunacti avatar mehmetgunacti commented on May 25, 2024 1

@chrisonline I didn't look for an alternative, the old (Java) version is still good enough for my app.

from android-iconics.

mikepenz avatar mikepenz commented on May 25, 2024 1

The newest version is only created for (and tested with) Kotlin.

from android-iconics.

mikepenz avatar mikepenz commented on May 25, 2024

@msegmx the new version is mainly targeted for kotlin users, it looks like you are trying to use it from a java project still though.

All those functions to set the above values are extension functions and won't be available from java.

from android-iconics.

mehmetgunacti avatar mehmetgunacti commented on May 25, 2024

Ah ok, it seems they have to be called via static methods in Java. Will give it try or simply go back to a previous version. Thanks!

from android-iconics.

chrisonline avatar chrisonline commented on May 25, 2024

@mehmetgunacti Did you find a solution to call this from Java? I am now in the same situation.

from android-iconics.

chrisonline avatar chrisonline commented on May 25, 2024

@msegmx the new version is mainly targeted for kotlin users, it looks like you are trying to use it from a java project still though.

All those functions to set the above values are extension functions and won't be available from java.

@mikepenz Does this mean I can't use the newest version with Java anymore?

from android-iconics.

chrisonline avatar chrisonline commented on May 25, 2024

Very sad, but thanks for the info.

from android-iconics.

mikepenz avatar mikepenz commented on May 25, 2024

Depending on your usecase, you probably could achieve a thing Kotlin based wrapper class which does the respective API adjustments to allow Java classes to use it.

from android-iconics.

chrisonline avatar chrisonline commented on May 25, 2024

I need only to set the icon size, padding and color. So the extension functions.
You mean I write a Kotlin wrapper class, so I can call this Kotlin wrapper from Java?

from android-iconics.

mikepenz avatar mikepenz commented on May 25, 2024

Indeed. A Kotlin class which is able to access the respective functions of the library, but created so it's compatible with Java.

One note on this. the IconicsDrawable has functions which should be available from Java:

https://github.com/mikepenz/Android-Iconics/blob/develop/iconics-core/src/main/java/com/mikepenz/iconics/IconicsDrawable.kt#L200 -> setSizeXPx
https://github.com/mikepenz/Android-Iconics/blob/develop/iconics-core/src/main/java/com/mikepenz/iconics/IconicsDrawable.kt#L249 -> setPaddingPx
https://github.com/mikepenz/Android-Iconics/blob/develop/iconics-core/src/main/java/com/mikepenz/iconics/IconicsDrawable.kt#L66 -> setColorList

(the extension functions in Kotlin also call these in the end)

from android-iconics.

chrisonline avatar chrisonline commented on May 25, 2024

Thank you very much for your input and help.
So I will try to use the "set methods". I have thought that this set methods are not available anymore because of the Kotlin functions.
Great, this would fit my needs.

from android-iconics.

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.