Get the phone screen size
Displaymetrics
Example
When developing mobile apps, in addition to the underlying understanding of the API, the most important thing is the concept of screen resolution. Because mobile phone manufacturers use different
Android has been widely sought after since its launch. Due to its open features, the market has emerged immediately. Different Versions of Android machines, different Android OS, and different OEMs, of course there will be a lot of inexplicable screen sizes. for this reason, I introduced in my previous article how to get the width and height of the Android mobile phone through encoding. With this width and
This article source: http://mp.weixin.qq.com/s?__biz=MjM5MTA1MjAxMQ==mid=201811994idx=1sn= 1c3bae60e2fe13d3bc3aeecaa6a4ef00scene=23srcid=abqlbfgvesx4dgnysdg8#rdWhat happens on the mobile side of the website on the PC?1: If the mobile side of the visible area (320-768), most of the site will be too narrow to show confusion;2: So the browser by default set the viewport to a wider value of 980px or 1024px, at
Mobile screen is the most direct interaction point between user and App.At different resolutions, the user has a distinct sense of perception of our app, and the updated iteration of the mainstream resolution is completely independent of the app. This makes it a challenge to keep the App on top of most mainstream phones with a sense of consistency and experience.Screen sizeStrictly speaking,
From: http://www.apkbus.com/android-83006-1-1.html
# Participate in the android bus 2nd Anniversary Essay activity #Recently, due to the wide development of Android, applications have gradually increased, more features have been learned, and the running platform has gradually expanded.From the initial Mobile Phone platform to today's tablet computers, LCD TVs, and other electronic products, the resolution of cell phones is unknown.In China,
the browser window on the screen
IE, Safari and Opera support Screenleft and Screentop
Firefox and Safari support ScreenX and ScreenY
Window.screen.availHeight, Window.screen.availHeightavailWidth
Measured in pixels
The available height and width of the browser's screen
The vertical space assigned to semi-permanent features (such as
Mobile device users more and more, the daily activation of Android phone has more than 1.3 million units, so we face the mobile Terminal WebApp also began to follow. This paper mainly introduces the relevant knowledge and experience of webapp development and debugging, and gives several optional solutions.I. Basic concepts (1) CSS pixels and device pixelsCSS
Preface
With the constant changes in mobile phone screens, some users' mobile phone screens are still in the size of 240*320. Of course, they are also stored in some irregular screen resolution. For many UIS, multiple sets of images can be drawn from different mobile phone
For a small number of mobile devices only need to fit, and the resolution of the page has little impact, the use of PX canFor devices that need to be adapted to a variety of mobile devices, use REM, such as a device that only needs to be adapted to different resolutions, such as iphone and ipad.html{font-size:10px}@media scre
According to the screen size and resolution, IOS currently has six versions.1, 3gs; 2, 4S: Representative; 3, iphone5; 4, ipad2: Representative; 5, ipad4: Representative; 6, iPad Mini.Only when the resolution is different, such as the first, second, or fourth, the development can provide two kinds of resolution, automatically recognized by the application?It's just the case that the sizes are different. For
One, the smartphone operating system, browser, screen size
NetMarketShare Data Site September 2015 smartphone operating system market share rankings. Android platform mobile phone, iOS platform iphone, BlackBerry (BlackBerry), the respective built-in Web browser, as follows:
Android Browser in Android
from://http://blog.csdn.net/ithomer/article/details/6688883Android to get the screen longer than the width, referring to the internet has a lot of code, but the results are inconsistent with the actual, such as my phone is i9000, the screen size is 480*800px, the results are 320*533The results are very unreliable, so I wrote a few lines of code, pro-TestTest para
, in the program development, in order to be compatible with different platforms different screens, it is recommended that different versions of the picture according to the needs of the corresponding folder.3. Get the screen sizeJava code
Displaymetrics metric = new Displaymetrics ();
Getwindowmanager (). Getdefaultdisplay (). Getmetrics (Metric);
int width = metric.widthpixels; //Screen width (
How big is your computer's screen size? How much does the screen resolution fit your computer's size? How much desktop wallpaper do you need to download? Did you ever get to know all this? Today Green tea small weave to take you to understand these computer wallpaper small common sense. After this tutorial netizens can
considering the horizontal screen in the case of adaptive.
2. Touch screen mobile phone is characterized by direct manipulation of the object, so the site needs to set an ideal row height to meet the touch of the finger click.A touch-click Dimension Data from lukew.com:The pitch of the index finger is about 7*7 mm,1mm spacing.Thumb-click spacing is about 8*8 mm
1, first screen size is the screen diagonal length size is fixed 2, the development of units relative units encountered (that is, relative to the screen): PX Em pt absolute units (fixed size, regardless of the device
Now more and more large-screen computer equipment, 1920x1080 pixels and higher resolution of the screen makes the picture more delicate and beautiful, but the higher resolution of the large size screen will sometimes have some trouble, although the unit area can show more
Applicable devices: IOS, Windows MobileOn some mobile devices, such as Iphone,windows Mobile, when the user switches the phone to a horizontal screen, the browser automatically resets the text font size. This can be confusing for us because we want to have full control over the design of the user interface and the rend
Android to get the screen longer than the width, referring to the online have a lot of code, but the results and the actual discrepancy, such as my phone is i9000, screen size is 480*800px, the result is 320*533 result is very unreliable, so I wrote a few lines of code, pro-Test Test parameters: Test environment: i9000 (Samsung) physical
1. Talk about a few concepts first pixels are units of measure and can be understood as points 1.css pixelsThe units measured in HTML are calculated using PX, which tends to be 1 css px = 1 physical pixels in the PC1css pixels in different devices correspond to different device pixels (physical
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.