title: accessing objects of xml layout android
body: <p>I have an activity (<code>MainActivity.java</code>) in which content view is like this </p>
  
  <pre><code>this.setContentView(R.layout.standalone_example);
  </code></pre>
  
  <p>my standalone_example.xml is like this </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent" &gt;
  &lt;com.abc.view.PageCurlView
      android:id="@+id/dcgpagecurlPageCurlView1"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:background="@drawable/page1" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I am done some work in <code>PageCurlView.java</code> now I want to access objects and variables of <code>PageCurlView.java</code> in my <code>MainActivity.java</code>, I am searching for hours but couldnt find any answer, any suggestions thanks in advance.</p>