How to add a rectangular overlay in a camera application?

view story

http://stackoverflow.com – How do I add a rectangular overlay (which should be more like a rectangular frame) in the camera preview? My application consists of a button that opens the camera upon clicking. I need the overlay in that camera preview. The code for the java file is: public class MainActivity extends Activity { Button b; Intent i; Bitmap bmp; final static int cameraData = 0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); b = (Button) findViewById(R.id.bu (HowTos)