@Override
public void onConfigurationChanged(Configuration newConfig)
{
super.onConfigurationChanged(newConfig);
platform().log().info("onConfigurationChanged");
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
platform().log().info("landscape");
} else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT){
platform().log().info("portrait");
}
}
--
---
You received this message because you are subscribed to the Google Groups "PlayN" group.
To unsubscribe from this group and stop receiving emails from it, send an email to playn+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "PlayN" group.
To unsubscribe from this group and stop receiving emails from it, send an email to playn+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
To unsubscribe from this group and stop receiving emails from it, send an email to playn+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
public ViewTwo(Platform plat) { super(plat, 33); // update our "simulation" 33ms (30 times per second) plat.log().info("ViewTwo"); plat.log().info("View Size" + plat.graphics().viewSize.toString()); // create and add background image layer Image bgImage = plat.assets().getImage("images/bg.png"); ImageLayer bgLayer = new ImageLayer(bgImage); // scale the background to fill the screen bgLayer.setSize(plat.graphics().viewSize); rootLayer.add(bgLayer); }
To unsubscribe from this group and stop receiving emails from it, send an email to playn+unsubscribe@googlegroups.com.
If you are handling onConfigurationChanged manually, you probably have to wait one frame before doing anything in response to the change to give GLSurfaceView a chance to dispatch its callback.
To unsubscribe from this group and stop receiving emails from it, send an email to playn+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to playn+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to playn+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to playn+unsubscribe@googlegroups.com.