[英]how can i set the “div” size according to screen orientation in phonegap
我开发了一个应用程序在手机间隙,看起来很好的肖像,如何在方向改变时增加div大小,可以有人帮助我。
You may want to consider using onRetainNonConfigurationInstance() for the heavy objects in your activity. 您可能需要考虑对活动中的重物使用onRetainNonConfigurationInstance() 。 Take a look at this article for a excellent explanation: http://developer.android.com/resources/articles/faster-screen-orientation-change.html .
请查看本文以获得一个很好的解释: http : //developer.android.com/resources/articles/faster-screen-orientation-change.html 。
Alternatively, you can use static data in an Application class. 或者,您可以在Application类中使用静态数据。 See the Application as a Singleton post here: http://androidcookbook.com/Recipe.seam?recipeId=1218
请在此处查看应用程序作为单身人士帖子: http : //androidcookbook.com/Recipe.seam? recipeId = 1218
You need to use responsive design for your pages. 您需要为页面使用响应式设计。 There are a few templates available such as Skeleton and Initializr.
有一些可用的模板,如Skeleton和Initializr。 If you don't want to use the templates you can just add CSS3 media queries yourself to set different div sizes based on screen width.
如果您不想使用模板,您可以自己添加CSS3媒体查询,以根据屏幕宽度设置不同的div大小。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.