https://kotlinlang.org logo
Join SlackCommunities
Powered by
# anko
  • s

    Seri

    12/13/2018, 9:03 PM
    the
    AckeeCZ/anko-constraint-layout
    branch looks like it’s got some amazing work done
  • s

    Seri

    12/13/2018, 9:04 PM
    I love declarative UI’s like this, but it’s all far from production-ready
  • d

    david.bilik

    12/13/2018, 9:09 PM
    its actually our’s company CL DSL for Anko 🙂 but Anko has its own implementation of constraint layout
  • s

    Seri

    12/13/2018, 9:12 PM
    Ah, neat! So you feel like that fork is production-capable? I’d love to explore it and help contribute, but it appears to be inactive
  • d

    david.bilik

    12/13/2018, 9:18 PM
    well its not a fork 🙂 its just a DSL for constraint layout .. its like a plugin
  • s

    Seri

    12/13/2018, 9:20 PM
    Ah, gotcha!
  • s

    Seri

    12/13/2018, 9:21 PM
    And it’s compatible with the Anko DSL builders
  • s

    Seri

    12/13/2018, 9:21 PM
    I’ll give it a shot, thanks
  • n

    nickk

    12/19/2018, 6:03 PM
    Hi! Any idea why the themed version crashes, with
    UnsupportedOperationException
    ?
    themedEditText
    works fine, for instance.
    Copy code
    // fine
        textView("> Hello from code $count") {
        }
    
        // crashes
        themedTextView("> Hello from code $count", theme = R.style.TextLarge2) {
        }
    AS 3.2, anko 0.10.8
    m
    • 2
    • 9
  • n

    nickk

    01/09/2019, 2:28 PM
    Hi. I am seeing different behavior when applying the same style in XML and when applying it through anko. Any idea?
    Copy code
    <style name="ButtonFlat" parent="Base.Widget.AppCompat.Button.Borderless">
            <!-- Borderless contains just this:   <item name="android:background">@drawable/abc_btn_borderless_material</item>-->
    
            <item name="android:textSize">20sp</item>
            <item name="android:textColor">@color/colorPrimary</item>
        </style>
    Copy code
    <Button
                        android:id="@+id/btnPercentage"
                        style="@style/ButtonFlat"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:paddingLeft="0dp"
                        android:drawableLeft="@drawable/ui_icon_triangle"
                        android:text="Percentage"/>
    Copy code
    themedButton("Take photo", R.style.ButtonFlat) {
                            onClick {
    
                            }
                        }.lparams(wrapContent, wrapContent) {
                            gravity = Gravity.CENTER
                        }
  • n

    nickk

    01/09/2019, 2:29 PM
    XML-assinged style vs anko-assigned style
  • d

    david.bilik

    01/09/2019, 5:36 PM
    You dont set style but theme. Its different thing. https://chris.banes.me/2014/11/12/theme-vs-style/
  • l

    LeoColman

    01/09/2019, 6:00 PM
    Is it possible to set style?
    l
    • 2
    • 1
  • n

    nickk

    01/10/2019, 12:25 PM
    @david.bilik @louiscad Since themes and styles differ only in the scope they are applied to (as stated in the linked blog post), why am I getting different results?
    l
    • 2
    • 1
  • m

    miha-x64

    01/29/2019, 2:55 PM
    Which is the recommended way for saving view states? Btw, is Anko being developed or abandoned?
  • m

    miha-x64

    02/08/2019, 1:30 PM
    Abandoned... 😿
    😢 8
  • n

    nickk

    02/09/2019, 10:47 AM
    @hhariri I have built my app based on anko. Many people here feel it is abandoned. Is Anko going to be updated for AndroidX? Apart from words and personal impressions: Github reports the androidx branch under the “*stale*” tab. No branch is reported as active. Should I ditch months of work and stop using anko?
    l
    h
    +4
    • 7
    • 8
  • l

    LeoColman

    02/18/2019, 6:17 PM
    I think that many times good devs from Jetbrains work on a good community project. It gets very good and very big. After some time, the good JB dev is reassigned to do some more important work, and the project stays abandoned for a lot of time. This isn't the first project this kind of thing happened 😕
    m
    • 2
    • 1
  • r

    ribesg

    02/25/2019, 10:33 AM
    Is there any alternative to Anko? I can’t justify starting a new app without androidx...
    p
    l
    +3
    • 6
    • 40
  • k

    kenkousen

    04/17/2019, 7:31 PM
    Today I encountered the
    browse(url)
    function for creating an implicit intent that opens a link in a browser (https://github.com/Kotlin/anko/wiki/Anko-Commons-%E2%80%93-Intents#useful-intent-callers) for the first time, and like so much of Anko, it’s awesome. Thanks to anyone working on the project 🙂
    👍 1
  • b

    Benoît

    04/23/2019, 6:22 PM
    Hey guys, I’m working on a solution for building layouts using pure Kotlin. It’s more of a research kind of thing at the moment so bare with me. Here’s a quick demo, link to the repo in the video description. Let me know your thoughts!

    https://www.youtube.com/watch?v=MmUCau26tLg▾

    ❤️ 4
    m
    • 2
    • 5
  • t

    Tsvetozar Bonev

    05/29/2019, 6:11 AM
    Hello, I'm new to Android and Anko as a whole and am struggling to make the connection between my business logic, my activity and the layout. Does Anko have any data-binding sort of ordeal for it's layouts and what is the practice for returning that data back to the activity, a public function accessed from an onClick or something else?
    p
    m
    • 3
    • 2
  • s

    sngrekov

    06/15/2019, 3:32 PM
    Hey! I am trying to build anko like it written in https://github.com/Kotlin/anko/wiki/Building-Anko and got an error while running ant -f update_dependencies.xml
    Can't get https://repository.jetbrains.com/remote-repos/net/sf/proguard/proguard-base/5.1/proguard-base-5.1.jar
    Anyone else encountered such errors?
  • n

    nickk

    07/26/2019, 1:46 PM
    @vyacheslav.gerasimov Hi there! What are your plans regarding AndroidX support in anko? 5 months ago I was told by @yan that you will complete work on AndroidX. I am about to start a new project, and I am puzzled. I want to reuse anko code from another project, and I am hesitating. @hhariri Don’t you feel that a 15.000 stars project deserves some love?
    h
    m
    +2
    • 5
    • 12
  • l

    LeoColman

    07/26/2019, 1:47 PM
    I think we had this discussion earlier, in february
  • l

    LeoColman

    07/26/2019, 1:47 PM
    Not a lot of things happening in Anko 😕
  • n

    nickk

    07/26/2019, 1:53 PM
    5 months later and after Google I/O, I hope the JetBrains people can share more information with us.
  • a

    amadeu01

    10/03/2019, 1:52 PM
    hi folks, I haven’t used anko, I’m trying to understand more. But, I got confused in the repository, I found this:
    implementation "org.jetbrains.anko:anko-sdk25:$anko_version" // sdk15, sdk19, sdk21, sdk23 are also available
    But, what is the difference between
    sdk25
    and others? I mean, if my android project is supporting a minimum target of sdk 19, I should import all the anko sdks from 19 to 25 ?
    r
    • 2
    • 1
  • y

    yan

    12/01/2019, 6:00 PM
    💬 Hello everyone! After some internal discussion, we decided to deprecate Anko. Some of you already knew about it, and now it’s official. You can find the details here: https://github.com/Kotlin/anko/blob/master/GOODBYE.md. Thank you for your continuous support throughout these years!
    😔 5
    👋 6
    😭 5
    👏 1
    l
    h
    +2
    • 5
    • 10
  • i

    ibcoleman

    12/22/2019, 5:53 PM
    Anyone out there hanging on to the bitter end with Anko? Curious if there’s a Maven/Gradle repo with the sdk28 dependencies from 0.10.8…