Jetpack Compose: The new Way of Building Android UI
Jetpack Compose is a modern toolkit for building native Android UI. It simplifies and accelerates UI development on Android with less code, powerful tools, and intuitive Kotlin APIs.
Development with Kotlin v1.0 1 Jetpack compose: The new way of building Android UI 1 1 Umar Saidu Auna Software Engineer, gidimo tech community Organizer umarauna February 19, 2022
binding:BottomSheetBuyUnitBinding //bind it to Fragment binding = BottomSheetBuyUnitBinding.inflate(inflater, container,false) return binding.root //make use of it binding.backImageView.setOnClickListener { dismiss() }
has over 31110 lines of code - All the Views(TextView, Button, ImageView, RadioButton etc) inherits from the View Class - Becomes difficult to maintain
to design the user interface based on the data received. Declarative Imperative This is the most common paradigm; it involves having a separate prototype/model of the application’s UI.
create an entire application. Declarative Imperative A good example is XML layouts in Android. We design the widgets and components which are then rendered for the user to see and interact with.