After Searching for very long and trying out different solutions, Finally I got the captured Image quality better than it was earlier.
I changed my code as :
RelativeLayout layout = (RelativeLayout) findViewById(R.id.layout);
layout.setDrawingCacheEnabled(true);
layout.buildDrawingCache(true);
final Bitmap bmp = Bitmap.createBitmap(layout.getDrawingCache());
layout.setDrawingCacheEnabled(false);
Canvas c= new Canvas(bmp);
File f = new File(Environment.getExternalStorageDirectory().getAbsolutePath()+"/" + System.currentTimeMillis()+".jpg");
try {
FileOutputStream out = new FileOutputStream(f);
c.drawBitmap(bmp, 0, 0, null);
bmp.compress(Bitmap.CompressFormat.JPEG, 100, out);
out.flush();
out.close();
} catch (IOException e) {
e.printStackTrace();
}
This is what helped me. Hope it'll help others too.