title: android RelativeLayout change height programmatically
body: <p>I try change layout height programmatically. I have two buttons. In one button I change my layout position and second button I try to receive save position witch I was first time.</p>
  
  <pre><code>&lt;RelativeLayout
      android:id="@+id/popaplayout"
      android:layout_width="fill_parent"
      android:layout_height="200dp" &gt;
  </code></pre>
  
  <p></p>
  
  <p>This is a my layout 
  and in first button I wrote</p>
  
  <pre><code>RelativeLayout.LayoutParams parms = new RelativeLayout.LayoutParams(
                      RelativeLayout.LayoutParams.FILL_PARENT,
                      RelativeLayout.LayoutParams.FILL_PARENT);
  parms.addRule(RelativeLayout.BELOW, R.id.movies_title_layout);
  scrollpopap.setLayoutParams(parms);
  scrollpopap.setScrollingEnabled(true);
  </code></pre>
  
  <p>and second button</p>
  
  <pre><code>RelativeLayout.LayoutParams rel_btn = new RelativeLayout.LayoutParams(
                      ViewGroup.LayoutParams.WRAP_CONTENT, 300);
  rel_btn.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
  scrollpopap.setLayoutParams(rel_btn);
  scrollpopap.setScrollingEnabled(false);
  </code></pre>
  
  <p>In <code>xml</code> file I wrote height 200dp and programmatically 300 and there are different height. How I can  wrote save height in programmatically?</p>
  
  <p>if anyone knows solution please help me
  thanks</p>