Skip to content

KUSHAL-RAJ-PAREEK/Android-Basic-to-Advance-Implementation-Files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android-Basic-to-Advance-Implementation-Files

Hello everyone this is my contribution for all but to use it properly you need to follow this steps:-

as we know now ("kotlin-android-extensions") plugin is deprecated in upper project it is used so please follow this steps to apply view binding:-

  1. in app level gradel enable viewbinding in android section by buildforces.
  2. now initilize binding in your kotlin activity:- the binding code is:-

code:-

private lateinit var binding: ResultProfileBinding override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) binding = ResultProfileBinding.inflate(layoutInflater) val view = binding.root setContentView(view) }

  1. now use binding keyword or anyelse which you mention in latinit before viwes.

before binding:-

       button.setOnClicklistner{}


       After binding:-


     binding.button.setOnClicklistner{}

for more information read:-

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

thank you.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published