title: How to get HorizontalScrollView width
body: <p>I am developing an application which consists of horizontal-scroll-view,I want to get width of <strong>HorizontalScrollView</strong>.How i can achieve this? it is returning as zero for me</p>
  
  <h2>in XMl in have like this.</h2>
  
  <p></p>
  
  <pre><code>&lt;TextView
      android:layout_width="50dp"
      android:layout_height="10dp"
      android:background="#00ff00" /&gt;
  
  &lt;HorizontalScrollView
      android:id="@+id/horizontalScrollView1"
      android:layout_width="fill_parent"
      android:layout_height="100dp"
      android:background="#ff0000" &gt;
  
      &lt;TextView
          android:layout_width="50dp"
          android:layout_height="10dp"
          android:background="#00ff00" /&gt;
  &lt;/HorizontalScrollView&gt;
  </code></pre>
  
  <p></p>
  
  <p>In Java</p>
  
  <pre><code>public class TestApplication extends Activity{
  
      private HorizontalScrollView horizontalScrollView1;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.testscroll);
  
          horizontalScrollView1 = (HorizontalScrollView)findViewById(R.id.horizontalScrollView1);
          horizontalScrollView1.getRight();
          horizontalScrollView1.getWidth();
  
          System.out.println("horizontalScrollView1.getWidth();::&gt;"+horizontalScrollView1.getWidth());
          System.out.println("horizontalScrollView1.getWidth();::1&gt;"+horizontalScrollView1.getMeasuredWidth());
      }
  </code></pre>
  
  <p>I have tried Following methods can any one help me please.</p>
  
  <p>Thanks 
  Nikhil</p>