[Android] Android Layout Binder -- automatically generates the java code artifact of findViewById Based on the layout Layout file, androidbinder

Source: Internet
Author: User

[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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.