title: Android: Set margins in a FrameLayout programmatically- not working
body: <p>here is the code-</p>
  
  <pre><code>FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) searchPin.getLayoutParams();
  params.setMargins(135, 176, 0, 0);
  //params.leftMargin = 135; // also not worked 
  //params.topMargin = 376;
  searchPin.setLayoutParams(params);
  </code></pre>
  
  <p>Where ever, from xml its working- </p>
  
  <pre><code>android:layout_marginLeft="135dp"
  </code></pre>
  
  <p>what can be the reason? am i missing something!</p>
  
  <p>-thnx</p>