[Android] Android Layout Binder -- automatically generates the java code artifact of findViewById Based on the layout Layout file, androidbinder
Android Layout Binder is a website that can automatically generate findViewById java code online based on the layout Layout file.
Web site is http://android.lineten.net/layout.php
How does Android get the custom components in the Layout file in Layout?
First, obtain the LayoutInflater of the current Activity:
LayoutInflater factory = LayoutInflater. from (this );
Use the LayoutInflater object to obtain Layout.
Final View DialogView = factory. inflate (R. layout. dialog, null );
Finally, use the layout to obtain the component.
M_EditText1 = (EditText) DialogView. findViewById (R. id. ip_address2 );
For android development, how does one classify layout files in the layout folder?
Currently, this cannot be solved. Currently, android does not support subfolders and R files are not automatically parsed.
So, put them all under layout. Classification can be divided by name, such as adding the same prefix.