title: How to findViewById form another XML file?
body: <p>I connent an addevent.java with addevent.xml is content a listview, the listview take its element from another XML file "item.xml"</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical" &gt;
  
          &lt;Button
              android:id="@+id/d"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignParentRight="true"
              android:layout_alignParentTop="true"
              android:drawablePadding="0dip"
              android:drawableRight="@drawable/icon_name" /&gt;
  
          &lt;EditText
              android:id="@+id/en"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:layout_alignParentTop="true"
              android:layout_toLeftOf="@+id/d" &gt;
          &lt;/EditText&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>now I need to findviewbyId not from basic xml file but form another "item.xml"</p>
  
  <p>I tried <strong>LayoutInflater</strong> as this, code but it isn't work:</p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.addevent);
          myList = (ListView) findViewById(R.id.MyList);
          myList.setItemsCanFocus(true);
          myAdapter = new MyAdapter();
          myList.setAdapter(myAdapter);
  
  
          final LayoutInflater factory = getLayoutInflater();
  
          final View textEntryView = factory.inflate(R.layout.item, null);
  
          tvDisplayDate = (EditText)textEntryView.findViewById(R.id.editd);
          btnChangeDate=(Button)textEntryView.findViewById(R.id.d);
  </code></pre>
  
  <p>any help please</p>