Define Resource Layout Id In the Activity/ Fragment Constructor — With AndroidX

Reduce the number of methods from your activity/fragment

Danish Amjad
AndroidPub
Published in
3 min readFeb 11, 2020

--

Credits

This article belongs to what I have Learned today, & Yes you heard it right you can define your resource layout Id in the constructor of your activity/ fragment with AndroidX.

--

--

Danish Amjad
AndroidPub

Senior Mobile Engineer (Android). Open Source Contributor, Technical Writer, ✉️ Dani.amjad12@gmail.com 🔗 https://danishamjad12.github.io