https://kotlinlang.org logo
Join SlackCommunities
Powered by
# splitties
  • l

    louiscad

    02/05/2020, 1:28 PM
    Hehe, I'm already dogfooding such a thing where I don't even need the
    onCreateOptionsMenu
    callback. BTW, the sample should already have
    addItem
    for menu, and a few other extensions. If not, it's a matter of time, once I'm done with the most important documentation parts.
  • m

    miha-x64

    02/05/2020, 1:35 PM
    I've written menu extensions for Anko some time ago: https://github.com/Kotlin/anko/pull/324/files
  • l

    louiscad

    02/05/2020, 3:15 PM
    Should I make yet another split named
    menu
    ?
  • j

    jmfayard

    02/07/2020, 10:39 AM
    @louiscad first you should release 3.0, but creating a feature request in the issues, yes!
  • s

    Sergio Crespo Toubes

    02/11/2020, 3:16 PM
    Is this the correct way using
    start
    and bundle extras with
    BundleSpec
    ?
    Copy code
    start<MyActivity> {
        MyActivity.ExtrasSpec.weight = weight
        MyActivity.ExtrasSpec.height = height
    }
    l
    • 2
    • 3
  • p

    patrickdelconte

    04/04/2020, 3:40 PM
    Is there any way to use the views dsl without constantly invoking
    add()
    for nesting
    Copy code
    verticalLayout {
            add(textView {
                textResource = R.string.some_text
            }, lParams())
    }
    Coming from other dsl’s it feels a bit cumbersome to me, I’d expect to be able to write something like
    Copy code
    verticalLayout {
        textview {
            textResource = R.string.some_text
        }
    }
    Am I missing something? I don’t have much experience with android
    r
    l
    m
    • 4
    • 4
  • l

    louiscad

    05/03/2020, 8:38 PM
    Hello dear Views DSL users, I just submitted a feature request for first-class support of IDE preview in Android Studio, you can star the issue as I'm pretty sure you'd like it: https://issuetracker.google.com/issues/155554920
    ⭐ 6
    m
    • 2
    • 2
  • l

    louiscad

    06/05/2020, 10:14 AM
    Hello folks, do I have any users already using Kotlin 1.4-M2 or planning to?
    ➕ 1
    ➖ 1
  • d

    dimsuz

    06/08/2020, 11:25 AM
    Hello! Is there a DSL for creating
    ColorStateList
    in code? I mean not loading from resources (
    colorSL
    ), but actually specifying states and colors manually.
    l
    • 2
    • 12
  • l

    louiscad

    06/11/2020, 2:09 PM
    Hello, for the users of the
    permissions
    split, I made a feature request to allow me to tell Android Studio and lint that a permission has been verified to be granted. Your stars will be appreciated: https://issuetracker.google.com/issues/158721540
  • i

    ispbox

    07/05/2020, 12:00 PM
    @louiscad What is your roadmap to release 3.0 version?
    l
    • 2
    • 2
  • m

    miha-x64

    07/21/2020, 8:24 PM
    Copy code
    dip(value: Int): Int
    dp(value: Int): Float
    This looks counterintuitive to me. Also, I miss (Float) -> Int overload: having Float dp makes much more sense than having Float pixels.
    l
    • 2
    • 3
  • m

    miha-x64

    07/21/2020, 8:37 PM
    And this is just horrible amount of indirection…
    Copy code
    return viewFactory(V::class.java
    l
    • 2
    • 4
  • m

    miha-x64

    07/28/2020, 2:10 PM
    🙀
    s
    l
    • 3
    • 6
  • m

    miha-x64

    07/28/2020, 9:00 PM
    Why do you need an XML layout (which prevents shrinking) and why
    Context.recyclerView()
    and
    View.recyclerView()
    have different behaviour? https://github.com/LouisCAD/Splitties/blob/8782cbb5d039a553ed2c5cf795eb53a86146ce91/modules/views-dsl-recyclerview/src/androidMain/kotlin/splitties/views/dsl/recyclerview/RecyclerView.kt#L27
    l
    • 2
    • 4
  • p

    pawegio

    08/21/2020, 9:02 AM
    Is splitties in version 3.0.0-alpha06 expected to compile without issues with Kotlin 1.4? I am unable to compile project after updating from Kotlin 1.3.70:
    Copy code
    Caused by: java.lang.IllegalStateException: Couldn't obtain compiled function body for public final inline fun <get-progressBar>(): splitties.views.dsl.core.styles.ProgressBarAndroidStyles defined in splitties.views.dsl.core.styles.AndroidStyles[PropertyGetterDescriptorImpl@4d0bbd88]
    	at org.jetbrains.kotlin.codegen.inline.InlineCodegen$Companion.getCompiledMethodNodeInner(InlineCodegen.kt:579)
    	at org.jetbrains.kotlin.codegen.inline.InlineCodegen$Companion.createInlineMethodNode$backend(InlineCodegen.kt:543)
    	at org.jetbrains.kotlin.codegen.inline.InlineCodegen.performInline(InlineCodegen.kt:143)
    	... 74 more
    l
    • 2
    • 3
  • l

    louiscad

    08/31/2020, 6:47 PM
    If any of you are using dev versions, you can update to 3.0.0-dev-077. It's very close to the next official release. I finally got a reliable publishing process that checks the artifacts are not corrupted after upload and before publishing. The Kotlin 1.4 compatible release is near.
    🙌 2
  • l

    louiscad

    09/12/2020, 6:39 PM
    The Kotlin 1.4 compatible release is even more near since publication of the version
    3.0.0-dev-105
    succeeded, validating the hardened publishing process (that validates every artifact can be resolved in an actual multiplatform project before publishing). Feel free to try upgrading your projects to Kotlin 1.4 and use this version. I have some more work before a proper release, but I'm on good track!
    💯 2
  • l

    louiscad

    09/14/2020, 11:42 AM
    📢📢📢 Splitties 3.0.0-beta01 is here! It got a lot of new stuff since alpha06 (look at alpha07 changes too), especially for Views DSL users and coroutines users. It works with Kotlin 1.4 and it enters the KMM game with iOS, macOS, watchOS, Windows and Linux compatibility for several splits (see the README). Take the time to read about the changes here: https://github.com/LouisCAD/Splitties/releases Also, if you like my work, please consider picking a sponsoring tier on GitHub sponsors so I can work towards dedicating more day time on it (rather than night time besides a full-time job) ❤️
    🚀 4
  • l

    louiscad

    09/14/2020, 11:47 AM
    Changed the short description to: "A collection of hand-crafted extensions for your Kotlin projects."
  • p

    pawegio

    09/15/2020, 12:58 PM
    I have a problem (in both
    3.0.0-dev-105
    and
    3.0.0-beta01
    ) with assembling custom build type. I have alpha build type declared in
    app
    module as follows:
    Copy code
    buildTypes {
        getByName("alpha") {
            applicationIdSuffix = ".alpha"
            versionNameSuffix = "-alpha"
        }
    }
    Untitled
    l
    • 2
    • 18
  • p

    Pierfrancesco Gulinelli

    09/16/2020, 12:45 PM
    I'm not able to see view dsl preview with beta01. So i have reverted alpha07. The design preview remains white.
    l
    • 2
    • 5
  • m

    miha-x64

    09/19/2020, 1:51 PM
    Thanks for
    UnreliableToastApi
    warning. Nice approach!
    😊 1
    l
    • 2
    • 1
  • p

    Pierfrancesco Gulinelli

    10/02/2020, 1:55 PM
    Which is the preferred method / extension to update layoutparams of a view?
    l
    • 2
    • 2
  • s

    Sergio Crespo Toubes

    03/08/2021, 12:19 PM
    Hello, how can i create a pendingIntent with extrasSpecs? Thanks
    l
    • 2
    • 15
  • d

    dimsuz

    04/20/2021, 11:29 AM
    What's the best translation of this into splitties' code?
    Copy code
    android:textAppearance="?attr/textAppearanceSubtitle1"
    Tried to find somthing like
    styledResourceId(R.attr.textAppearanceSubtitle1)
    , but no luck.
    l
    • 2
    • 4
  • i

    ispbox

    04/26/2021, 8:22 PM
    @louiscad Do you have any plans to move from jcenter() repository? It looks like that only few days are left before total shutdown, and I suppose splitties will become unavailable.
    l
    • 2
    • 4
  • r

    ribesg

    06/02/2021, 11:16 AM
    Removing
    splitties-coroutines
    from my Kotlin Native project fixed an error caused by (I think) the difference in kotlinx.coroutines version it was compiled against
    l
    • 2
    • 6
  • m

    miha-x64

    08/31/2021, 10:48 AM
    Do you folks declare view_ids.xml like this or simply write 1, 2, 3 etc?
    l
    • 2
    • 9
  • j

    Jon Miller

    02/16/2022, 4:16 PM
    @louiscad Do you think views dsl is still a valid way to go or should one just use jetpack compose if they want to break free from xml?
    l
    • 2
    • 3