https://kotlinlang.org logo
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
benchmarks
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
confetti
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
lincheck
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by
Title
b

burak.eregar

05/08/2019, 2:58 PM
https://medium.com/@burakeregar/jetpack-compose-android-apps-without-xml-534d74448778 I wrote an article about Jetpack Compose which announced yesterday at Google I/O. Any feedback would greatly appreciated!
👍 4
p

Paul Woitaschek

05/08/2019, 3:32 PM
Well that's pretty self explanatory. Whats interesting is how it really works under the hood. What does the plug-in exactly generate? Is it really not using the view system? Is it using surfaceview? How does scrolling work? Wasn't surfaceview free of the main thread restriction? Well that would enable large performance gains. How does layout measurement work? These are questions I'd find interesting to find an answer to
👍 2
r

rook

05/08/2019, 3:38 PM
@Paul Woitaschek Of course it’s using the view “system”. The XML isn’t magic, there’s underlying code that generates
View
type objects based on the XML definition. Compose is just a shortcut to generate those things from Kotlin DSL structures instead. `View`s will still work exactly like they always have. This isn’t a different graphical/layout/view system, this is just a different way to utilize the one that already exists.
b

burak.eregar

05/08/2019, 3:39 PM
I am looking forward to listening "Declarative UI patterns with Android Jetpack" talk today which will give us more context.
4
s

sngrekov

05/08/2019, 3:54 PM
@rook I think Paul meant Android's View classes, and no, by default Compose will not use them , but will have interop with them.
1
r

rook

05/08/2019, 3:59 PM
@sngrekov Interesting. Can you link me to the source files where it shows that Compose does not generate View classes?
p

Paul Woitaschek

05/08/2019, 4:00 PM
Yes, of cause somewhere it's using view. Each game uses views. (mostly exactly one surface). But from what I heard what's happening is fundamentally different to a regular app composed of multiple android.view.View classes. It does not seem to be a simple dsl
I'll check the source code later, I'm currently in the garden with the kids and browsing git doesnt work too well
r

rook

05/08/2019, 4:06 PM
I’m trying to browse through the AOSP source myself, but I’m not very familiar with it, so I can’t seem to find the Compose code. Although, you just mentioned exactly the point I was making. Everything is a
View
at some point. Nothing is different in Compose except for the way we go about having those `View`s created.
p

Paul Woitaschek

05/08/2019, 4:09 PM
Well no. You can either go the traditional way and use layouts and views or you can draw on the surface like flutter
👍 1
Try to compile the sample app and use the layout inspector :)
n

nickk

05/08/2019, 4:24 PM
Why not adopt and enhance anko ?
s

sngrekov

05/08/2019, 4:54 PM
Anko is basically is syntax sugar on top of current Android view system, it doesn't even have diff algo
g

ghedeon

05/08/2019, 4:55 PM
yep, the main goal (I hope) is not another syntax but immutable views, means virtual DOM + smart diffs. Basically, React.
s

sngrekov

05/08/2019, 4:56 PM
@rook
👍 2
💯 1
g

ghedeon

05/08/2019, 5:07 PM
@burak.eregar sorry mate, but other than "activity imitation" to promote someone's profile I can't really see the purpose of this "article". It's like forking repos in batch on GitHub before job application, to get green squares 😄. It's probably too early to write something meaningful about the subject, they even failed to make it work from the first try live on stage, lol.
b

burak.eregar

05/08/2019, 5:55 PM
Thanks for your feedback. My purpose is giving heads up to people who haven't watched the keynote, gathering all the information we have together and keep this post updated once we get more updates on it. As I said I am looking forward to listening the talk later today.
r

rook

05/08/2019, 5:58 PM
@sngrekov consider my mind blown. I had no idea.
t

themishkun

05/08/2019, 11:01 PM
Why they call () -> Unit functions "pure"? Why to use a mutable model with annotation? Why not to return a structure representing the desired ui and then do the reconcilation algorhythm on it?
2
l

laimiux

05/08/2019, 11:58 PM
@themishkun I’ve asked the same question in the #compose-wtf inside of Android Study Group. I wasn’t completely sold on their reasons, but here an image of it.
👍 1
i

itnoles

05/09/2019, 1:04 AM
How does anyone able to get the custom Kotlin plugins?
p

Paul Woitaschek

05/09/2019, 4:56 AM

https://www.youtube.com/watch?v=VsStyq4Lzxo

💯 1
t

themishkun

05/09/2019, 7:09 AM
@laimiux Oh, thanks for asking that! Can you also reach out to ask about what problem they are trying to solve using
@Model
annotation they shown in the talk above? It seems like it can add unnecessary complexity, unexpected behaviour and circular dependencies. We already have Delegates.observable, why to make a compiler plugin do exactly that?
2
g

ghedeon

05/09/2019, 10:03 AM
asking the real questions... ☝️
r

romainguy

05/10/2019, 9:56 PM
Jetpack Compose does not create Views
3
👌 3
p

Paul Woitaschek

05/11/2019, 5:08 AM
@romainguy But one view it needs if it wants to draw stuff. What kind of view is it? Is it a surfaceview? Where can I find the soruce for that view?
t

themishkun

05/11/2019, 9:08 AM
@romainguy Is there any dev's approved way to reach out with questions and feedback? Also is there anywhere a public roadmap for the project?
s

sngrekov

05/11/2019, 9:23 AM
@Paul Woitaschek It draws on canvas
t

themishkun

05/11/2019, 9:36 AM
@romainguy If you partnered with JB on making this project live, have you seen this project on reconcilation algo then? https://github.com/JetBrains/noria-kt
p

Paul Woitaschek

05/11/2019, 12:40 PM
@sngrekov you need a view to get a canvas
r

romainguy

05/11/2019, 7:06 PM
You don’t need really need a View to get a Canvas no
But currently we use a View as an anchor in the existing window and then it’s all Compose after that
It’s not a SurfaceView
And it doesn’t matter because it’s implementation details anyway, this might change based on the version of the platform (we may use multiple Views, attached or not, to benefit from render nodes/display lists, etc.)
@themishkun We’re trying to figure out what’s the best way to answer questions and feedback, stay tuned
t

themishkun

05/12/2019, 5:14 PM
#compose is the new channel