title: Tool to auto generate Class fields of 'View' type from layout XML?
body: <p>I'm using eclipse Android SDK, as i can see there are code generator tool builtin to generate getters() and setters() from the current class. I'd like to know if there are such tools to auto generate Android View class instances, into the current class from a given layout. Possibly auto instantiate them in the onCreate() call back. </p>
  
  <pre><code> &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginBottom="5dp"
          android:layout_marginLeft="10dp"
          android:layout_marginRight="10dp"
          android:layout_marginTop="5dp"
          android:orientation="vertical"
          tools:context=".Main" &gt;
  
          &lt;TextView
              style="@style/Divider_Title"
              android:text="@string/pi_name_title" /&gt;
  
          &lt;View style="@style/Divider" /&gt;
  
          &lt;EditText
              android:id="@+id/et_firstname"
              style="@style/EditText"
              android:hint="@string/pi_first_name"
              android:inputType="textPersonName" /&gt;
  
          &lt;EditText
              android:id="@+id/et_lastname"
              style="@style/EditText"
              android:hint="@string/pi_last_name"
              android:inputType="textPersonName" /&gt;
              ....
  </code></pre>
  
  <p>would generate for an already existing class SignIn</p>
  
  <pre><code>public class SignIn extends FragmentActivity  {
  
      private EditText et_firstname;
      private EditText et_lastname; 
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_registration);
  
          et_firstname = (EditText) findViewById(R.id.et_firstname);
          et_lastname = (EditText) findViewById(R.id.et_lastname);
                  ...
  
      }
  </code></pre>