obviously not the size of the i9000 screen of the test machine.
Method 3: multiply the results obtained from methods 1 and 2 by the density, and then the perfect 480*800, perfect!
Note:If the density is greater than 1, you must set the targetSdkVersion to 4-9. For example:
However, does this mean that method 3 must be generic?
The answer is no, because I also tested it on the simulator, HTC G14 physical
width: window. Screen. availwidth -------------------
Technical PointsThis section uses the window attributes of the Document Object. The main functions and usage of these attributes are as follows.
To obtain the window size, different properties and methods are required for different browsers: to check the actual size of the window, use the window attribute in
At the beginning, the simulator I selected was WVGA854 with a resolution of 854*480. After the development, I felt very OK when I installed it on a 800*480 mobile phone, but when I installed it on a 480*320 or 320*240 resolution mobile phone, many interfaces were distorted, at this time, I felt the importance of app self-adaptation.
Adaptive mainly encounters two major problems: switching between the landscape screen and the landscape
Screen size1. Different layoutAndroid phone screen size is different, there are 480x320,640x360,800x480. How can I get the app to adapt to various screens automatically? In fact, it is very simple to create a different layout folder in the Res directory, such as: layout-640x360,layout-800x480, all layout files will be compiled after compilation Write to the R.jav
This article describes how to use JS to obtain the screen, browser window size, and webpage height and width. For more information, see document. body. clientWidth.
Visible area height: document. body. clientHeight
Visible area width of the webpage: document. body. offsetWidth (including the width of the edge)
Visible area height of the webpage: document. body. offsetHeight (including the width of the edge)
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
Mobile Safari in iOS
WebKit browser in BlackBerry
UI elements of different sizes.
3. SP
Scale-independent PIXELS:SP Unit is consistent with DP, the difference is that SP units support scale, and when the user adjusts the standard font size in the settings, the PX corresponding to each SP will change.
How is the screen size defined in Android?Screen
What about the size of the laptop screen? How do I look at the laptop screen model? For this problem, I feel simple, but not how to explain. We know that General notebook screen size mainstream relatively fixed several sizes, generally have 13.3 inches, 14 inches and 15.6 in
Screen Size:
I. Different Layout
The screen sizes of Android mobile phones vary by 480X320,640x360,800 X. How can an app automatically adapt to different screens?In fact, it is very simple, just need to create different layout folder under the res directory, such as layout-640x360, layout-800x480, all the layout files will be written to R after compilation. java,
Disable screen in CentOS to change the window size when creating a new window
Disable screen in CentOS to change the window size when creating a new window
When you use screen in Centos, such as Xshell or Putty, the size of the
At present, there are more and more Windows Phone devices and more sizes and resolutions on the market, especially the arrival of the wp8.1 era. People who have worked on WP development know that application adaptation is much simpler than Android. One important reason is that Microsoft claims that all WP devices will develop with two benchmark resolutions, that is, 800: 480 and 853: 480. The application adaptation of WP8 + is relatively simple, mainly to adapt the
Android discussion --- getting the phone screen size
SurfaceView simple example
Go to Android --- UI --- ZoomControls to zoom in and out images
For more information, here is a summary of the operations on the mobile phone screen in android:
1. Get the screen resolution (because when processing the display in android, y
With the current popularity of widescreen displays, Flash Full-screen mode, more and more need to take into account the difference between the Pu monitor and widescreen display.
Flash Full-screen mode has the following features:
1, the window to maximize, and the top display;
2, in the default (Flash content automatic scaling) state, the SWF file to maintain the aspect ratio to scale, until wide, high on
Document directory
1: Main Screen Size
2: Mobile Phone size
1: pixel (PX)
2: Resolution resolution
3: density Density
4: DPI densitydpi
5: Dip (DP) device independent Pixel
Note: There is a formula
6: SP pixel Amplification
7: Resolution of each screen
I have never been very clear about the cell phone
The screen size of Android mobile phones has always been a headache for developers. Because the screen sizes used by mobile phone manufacturers are different, the presentation and layout of user UI interfaces are naturally different. Therefore, when developing Android mobile appsProgramIn addition to understanding the underlying API, the most important thing is t
*Screen Size: Length of screen diagonal*Resolution: The number of pixel points in 2 directions, common value 480X800, 320X480*dpi:dots per inch, pixel density, which is the number of pixels per inch.* Calculation method: Screen resolution/Screen physical
Recently feel like to be the screen fit to play dead ...Android phone for shrimp can not be like Apple, just a few resolutions? Why,!!!!!!!? Amen......There are two ways to solve this problem now ...The first type:Html5+css3+webview interaction ... Currently in the study, empty put demoThe second type:Handled by the Android UI's own layout:1. Screen interface layoutCreate different layout (drawable) folders
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 height, we can implement Android adaptive
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.