tytydraco / Buoy

An extension to the built in Android Battery Saver
https://play.google.com/store/apps/details?id=com.draco.buoy
BSD 2-Clause "Simplified" License
170 stars 24 forks source link

Enable View Binding #3

Open LLJY opened 3 years ago

LLJY commented 3 years ago

view binding is a type-safe way to interact with your layout from view. Every XML created gets a generated Binding class which you can use to access the ui components. this is usually preferred over findViewById as it is type-safe and makes your code look cleaner, especially if you have a lot of components, you can avoid having tons of global variables.

please see https://developer.android.com/topic/libraries/view-binding