Sidebar

Kotlin

kotlin
Kotlin Kiuyn 2 weeks ago 100%
Lost while learning

Hi everyone, I am learning kotlin as my first language(I have a bit of python knowledge mostly useless stuffs) I am following the android tutorial for kotlin and now I am 100% lost at the tip calculator in kotlin [here](https://developer.android.com/courses/pathways/android-basics-compose-unit-2-pathway-3). What should/could I do to improve my situation? Any recommend would help me a lot. Thank!

5
5
kotlin
Kotlin shalva97 1 month ago 92%
Kotlin is Tetris

Source: https://toggl.com/blog/programming-languages-games?ref=dailydev

83
13
kotlin
Kotlin shalva97 1 month ago 92%
Java vs Kotlin
84
8
kotlin
Kotlin isseverDev 3 months ago 75%
Introducing iCore: Simplify Your Android Development! github.com

Hey everyone, I'm excited to share iCore, a new library designed to streamline Android application development with modular and reusable components. iCore supports the MVVM architecture and provides base classes, extension functions, and various utility classes to reduce code duplication and speed up the development process. Key Features: - Reducing Code Duplication: By abstracting commonly used operations, it prevents the writing of repetitive code. - Quick Start: With ready-to-use core components, it allows for a quick start to projects. - Easy Integration: Easily integrates common operations like Retrofit, LiveData observation, and theme/language selection. - Reactive Data Management with Kotlin Flow and LiveData: iCore manages asynchronous data streams using Kotlin Flow and handles UI updates with LiveData, offering a more reactive and modern data processing model. - Extensive Extensions: Its extensible structure allows for customization according to application needs. - Centralized Management: Provides centralized management by allowing easy access to application resources with ResourceProvider. Links: 🔗 GitHub: [iCore on GitHub](https://github.com/issever22/iCore) 🔗 JitPack: [iCore on JitPack](https://jitpack.io/#issever22/iCore) I'm looking forward to your feedback and contributions. Happy coding!

2
1
kotlin
Kotlin the_ocs 3 months ago 100%
Sigbla release v1.24.4 with major improvements to UI functionality github.com

# Changelog ## v1.24.4 - 2024-06-24 - Flat Sun Focus in this release has been on improving and refactoring frontend code, adding UI features such as column and row hiding and locking through `Visibility` and `Position` meta classes. Other UI related features, such as supporting the height and width of individual cells have also been implemented, allowing for column and row span functionality. Additional frontend changes include adding a marker, which allows cells to be selected and improves the way input is passed on to underlying UI cell content. This allows for better widget and chart functionality among other improvements for code that wishes to extend the frontend functionality. Finally, a more flexible approach is now supported around providing custom HTML/CSS/JS allowing for alternative styling and other such changes to the frontend rendering. Two view configs are provided out of the box to illustrate this, the compact and the spacious, with compact being the default choice when using `show(..)`. It is expected that this will be the final alpha release of v1. ### Added - Add a cell marker, allowing cells to be selected with input passed to underlying cell content - Add functionality to position columns to the left or right and rows to the top or bottom - Add functionality to hide columns and rows - Add support for custom UI config with custom HTML/CSS/JS - Implement cell height and width rendering when these are defined on cell ### Fixed - Nothing ### Changed - Rename init parameter to receiver for on(..) functions and process to processor on related for improved API intuition - Change HTML structure of cells, also harmonize this with column and row headers - Update widgets and charts to work with frontend changes - Various documentation updates relating to changes ### Removed - Nothing

4
0
kotlin
Kotlin DieguiTux8623 5 months ago 100%
Room/KMP is finally here! developer.android.com

Cross-posted from: https://programming.dev/post/13516196

3
0
kotlin
Kotlin Aatube 6 months ago 100%
Put part of a LazyColumn under a Card

I have a screen where I want a lazy-loading card of various items below some necessary information, all of which will scroll down. My initial approach was to nest the lazycolumn under the card which is nested under a Column with a calculated nested height based on the size of the `calls` list. However, I can't do that, and neither can I do the following. ``` @Composable @Preview fun mockup() { val calls = mutableStateListOf(Pair(1..418, 418 downTo 1)) MaterialTheme { LazyColumn(Modifier.verticalScroll(rememberScrollState())) { item { Text("Text and some necessary UI elements") Slider(value = .418f, onValueChange = {}) } Card(Modifier.fillMaxWidth()) { items(calls.asReversed()) { Row { Text(it.first.toString(), Modifier.fillMaxWidth(0.5f), fontWeight = FontWeight.Black) Text(it.second.toString(), Modifier.fillMaxWidth(0.5f)) } } } } } } ``` I found [https://stackoverflow.com/questions/68182413/compose-lazylist-section-background](https://stackoverflow.com/questions/68182413/compose-lazylist-section-background), for which the only viable solution found was to hack a special composable widget so that when combined, it looks like a continuous card. Still, I want to see if there's a "proper way" of doing this...

5
0
kotlin
Kotlin the_ocs 6 months ago 100%
Conway's Game of Life example

I've had a long time fascination with [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway's_Game_of_Life), and with the Sigbla APIs starting to stabilize I thought it would be fun to play around a bit and implement it as an example. You can find the [Conway example code here](https://github.com/sigbla/sigbla-app/blob/2272fb939fd41339baa4ef99fefe46e5e0d10d29/examples/src/main/kotlin/sigbla/examples/Conway.kt), and it should hopefully, even if you're unfamiliar with Sigbla, be fairly straight forward to understand. It's using various core features, such as views, batching, transformers and cloning, with about 100 lines of code to get it all working. It's not really what I would envision Sigbla being used for, but it's a fun little example.. ![Conway's Game of Life in Sigbla](https://raw.githubusercontent.com/sigbla/sigbla-app/2272fb939fd41339baa4ef99fefe46e5e0d10d29/examples/docs/conway.png)

5
3
kotlin
Kotlin bestof 6 months ago 87%
Open Source Support for Kotlin Projects tech.target.com

Looks like we have some extra support for Kotlin projects. 1. [http4k](https://github.com/http4k/http4k) 2. [mockk](https://github.com/mockk/mockk) Each given $2,500 (which is chump change for a company like Target, but it's better than 0) from https://opencollective.com/target-tech

6
0
kotlin
Kotlin austin 7 months ago 100%
Gradle Version Catalog Generator Plugin github.com

If you've played around with version catalogs enough, you will inevitably come to a point when you when you want to also use a BOM in your version catalog. Doing that just feels so...clunky? You need to declare the BOM in the libraries section, and then you have to declare each individual dependency from the BOM as a library (without a version). Alternatively, you can just skip using the BOM entirely and declare each dependency without the BOM. In either case it's not a great experience and definitely could use some improvement. I wrote a Gradle plugin (in Kotlin) to automatically generate a version catalog from a BOM so you only have to specify it once, let me know what you guys think!

5
0
kotlin
Kotlin puppy 8 months ago 100%
Applying BuildScript Classpath to Gradle Convention Plugin

Hello developers! I need some programming advice and I hope that I am not off-topic. I couldn't find a more relevant group in Lemmy. I have a Gradle convention plugin (written in Kotlin) that needs a buildscript classpath. But I can't get it to resolve correctly in the project. 1. If I add the buildscript classpath to the convention plugin and then apply the plugin to the project, it throws an error saying that buildscript is not allowed and the plugins section should be used instead. 2. If I add the buildscript classpath to the project itself (although this doesn't feel right because the convention plugin should be already compiled), then it throws an error saying that the dependencies are not met (classpath not applied). Any advice?

7
4
kotlin
Kotlin the_ocs 9 months ago 100%
Persistent data structures github.com

I've for a good while been using an excellent port of Scala's [persistent data structures](https://en.wikipedia.org/wiki/Persistent_data_structure) in my Kotlin code known as [Dexx](https://github.com/andrewoma/dexx). This also works well from Java code. However, while the project is what I would call feature complete, it's no longer maintained, resulting in outdated dependencies. It would also become problematic should any bugs or issues pop up. Hence I decided to fork it as [Sigbla PDS](https://github.com/sigbla/sigbla-pds) and tidy it up a bit, with v1.0 now released and ready for use.

4
0
kotlin
Kotlin Lime66 9 months ago 100%
Where should I learn kotlin?

I was using freecodecamp's tutorial on Kotlin but I was told that a video isn't a good way to learn a language. So I did the hyperskill course but it marks all of my answers as wrong even when the code works, and the subscription for more than *ten* questions a day is crazy expensive. I will be getting atomic kotlin soon but I still want to learn before it comes

8
5
kotlin
Kotlin DieguiTux8623 10 months ago 100%
Coil goes multiplatform https://talkingkotlin.com/coil-goes-multiplatform-with-colin-white/

At least they took the grant from the Kotlin Foundation... Let's wait for version 3 to be ready!

2
3
kotlin
Kotlin the_ocs 10 months ago 100%
Sigbla is a framework for working with data in tables, using the Kotlin programming language. github.com

It supports [various data types](https://sigbla.app/docs/cells/), [reactive programming and events](https://sigbla.app/docs/table_subscriptions/), [user input](https://sigbla.app/docs/widgets/), [charts](https://sigbla.app/docs/charts/), among other things.

3
0
kotlin
Kotlin DieguiTux8623 10 months ago 100%
Amper – Improving the Build Tooling User Experience | The JetBrains Blog blog.jetbrains.com

Cross-post da: https://programming.dev/post/3241281

4
0
kotlin
Kotlin DieguiTux8623 11 months ago 80%
Won't it? Open for debate www.donnfelker.com

Seen this post by Donn Felker (!) on some other discussion platform and though I'd like to see the opinion of Lemmings about it.

3
3
kotlin
Kotlin samus7070 12 months ago 85%
Implementing Multiplatform Kotlin library kt.academy

Usually when I read a KMP article it talks about mobile. This one is about JS and the JVM.

5
0
kotlin
Kotlin samus7070 12 months ago 83%
Making Multiplatform Better https://talkingkotlin.com/making-multiplatform-better/

>In this episode, we talk to Rick Clephas, one of the Kotlin Foundation Grants Program winners and the creator of KMP-NativeCoroutines and KMM-ViewModel. When I last used KMP it was before the new memory model so I avoided coroutines as much as possible. A year later and it looks to be so much easier and better now.

4
0