public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
float dip = getResources().getDisplayMetrics().density;
FrameLayout fl = (FrameLayout)findViewById(R.id.framelayout);
fl.setLayoutParams(new FrameLayout.LayoutParams((int)(320*dip),
(int)(570*dip), Gravity.CENTER_HORIZONTAL));
}