title: Place view inside FrameLayout in Android
body: <p>I want to add a view inside a FrameLayout programmatically and to place it in a specific point within the layout with a specific width and height. Does FrameLayout support this? If not, should I use an intermediate ViewGroup to achieve this?</p>
  
  <pre><code>int x; // Can be negative?
  int y; // Can be negative?
  int width;
  int height;
  View v = new View(context);
  // v.setLayoutParams(?); // What do I put here?
  frameLayout.addView(v);
  </code></pre>
  
  <p>My initial idea was to add an AbsoluteLayout to the FrameLayout and place the view inside the AbsoluteLayout. Unfortunately I just found out that AbsoluteLayout is deprecated.</p>
  
  <p>Any pointers will be much appreciated. Thanks.</p>