Tag Archives: code

Android Layout Finder online tool

Hi guys, hope you had a great new years!

If you’ve ever developed an Android app, you’ve probably used the findViewById() method for finding views and findFragmentById() for finding fragments from your inflated layout. This has to be done with every View and Fragment that you want to access from your code.

After getting tired of writing the same code over and over again, I created a tool to generate that code for me from an arbitrary XML layout:

Behold: The Android Layout Finder!

You can try it out on a sample XML layout by pressing the ‘Paste example XML’ button in the right side of the screen.

Android Layout Finder is open source and licensed under the GNU General Public License. The code can be found on GitHub: http://www.github.com/jesperborgstrup/android-layout-finder. Enjoy!