I have used this code to change videoview during rumtime
So, I am using this code
VideoView video;
DisplayMetrics dm;
dm=new DisplayMetrics();
this.getWindowManager().getDefaultDisplay().getMetrics(dm);
height=dm.heightPixels;
width=dm.widthPixels;
video.setMinimumHeight(height);
video.setMinimumWidth(width);
and on clicking of Menu item I am using this
public boolean onOptionsItemSelected(MenuItem item)
{
switch(item.getItemId())
{
case SMALL:
video.setMinimumHeight(height/2);
video.setMinimumWidth(width/2);
Toast.makeText(getApplicationContext(), "Small called", Toast.LENGTH_LONG).show();
break;
case DEFAULT:
video.setMinimumHeight(height);
video.setMinimumWidth(width);
Toast.makeText(getApplicationContext(), "Default called", Toast.LENGTH_LONG).show();
break;
}
return super.onOptionsItemSelected(item);
}
But Still it is not getting changed.... Can anybody help??