Android screen adaptation
Android screen adaptation
Adaptation method a picture adaptation
Adaptation mode two Dimensxml file adaptation
Adaptation method three layout file adaptation
Adaptation mode four Java code adaptation
Adaptation Method five weights fit
fit : The current app shows the same effect on the same phone. Before the adaptation needs to first determine the current cell phone pixel density type
Use canvas today. when the drawBitmap method draws an image, it finds a problem. When it is made in version 2.1, It is center-centered. When it is used in version 2.2, it finds the same image, but it cannot be centered. After reading the code, I used the same image and thought about it. It is estimated that it has something to do with the version. So I tested it and found the same test code, in version 2.1, the screen length and width are 533*320, and the width is
initial scale, that is, the scale when the page is loaded for the first time.
Maximum-scale: the maximum scale that users can scale.
Minimum-scale: minimum scale that allows users to scale.
User-scalable: whether the user can manually Scale
Questions about viewport
Viewport is not only unique in ios, but also has viewport on android and winphone. They solve the same problem, that is, directly resetting the resolution between the physical size and the browser through dpi, regardless of the act
After my research during this period, I found that the size of the mobile phone screen does not matter whether the game can be fully displayed, because the resolution is different. For example, cocos2d-x for our developers to provide the resolution is 480*320, we can easily make the game full screen display, but the problem is the big point of the phone resolution?
Here is the resolution of some mobile phones I found online:
We can see that
A new window pops up when a user clicks on a linkJavaScript uses the Window object's open () method to create a new browser window, which has three parameters:window.open (Url,name,features)URL: New window address, if omitted, a blank window pops upName: Names of new windowsFeatures: The properties of the new window.Like what:function Open_url (URL) { window.open (URL, "New-window", "width:320,height:480"); } Use the "javascrip
, 0, 640, 480); }); }, false); Script> Head> Body> Div> Disclaimer: This div should be allowed to use webcam, after the webcam dynamically generated wide: 640 *480, of course, can be dynamically controlled! - Ideally these elements aren ' t created until it ' s confirmed that the client supports Video/camera, but for the sake of Illustrating the elements involved, they is created with markup (not JavaSc
I accidentally found that my DB2 test environment could not be used. I always reported an error when I opened it. I always thought it was db2audit and reported an error.
I accidentally found that my DB2 test environment could not be used. I always reported an error when I opened it. I always thought it was db2audit and reported an error.
I accidentally found that my DB2 test environment could not be used. I always reported an error when I opened it. I always thought it was db2audit and repo
Physical size : The length of the screen diagonal, such as 4 inch (3 inch =10cm)Resolution : The total pixels displayed on the screen, such as 480*800 (480 pixels wide, 800 pixels high)pixel density : dpi, dots per inch (1 inch =2.54cm)Resolution of an edge (total pixels) = physical dimensions of the edge (in inches) x pixel densitycell phone screen density : Low density (ldpi,120dpi), medium density (mdpi,
This is some bloggers own self-adaptive understanding of the Android screen, there is no place to spray.First of all, observe the new Project Res folder, you can expect to find Drawable folder has many, such as drawable-hdpi, drawable-ldpi, drawable-mdpi, drawable-xhdpi, These folders are Google for the screen self-adaptation to do the preparation, meaning that friends in the screen to adapt before you should prepare 5 sets of resource pictures to come out of the problem. The corresponding propo
Dip or DP (density-independent pixels)Length (true length): inches, inchPixels per inch dpi (screen density)Pixels: pxDip formula: px/dip=dpi/160 (screen pixel/dip = screen density/160), inch = Px/dpi,dip=160*inchScreen 320*480, the number of pixels in the horizontal direction is 320, the number of pixels in the vertical direction is 480, the resolution is 160 (meaning the number of pixels per inch 160)So t
):4.7-inch mobile phone, 1280x768 resolution IPS display, pixel density up to 320PPI.Nexus Ten (10.055 ", 2560 x 1600:xhdpi):10.055-inch screen tablet device, 2560 x 1600 resolution, 300PPI,PLS material.Nexus 7 (7.02 ", x 1920:xhdpi):The 7-inch screen tablet device, 1920x1200 Pixel resolution, has a 323ppi and a 30% increase in color performance on the screen.Galaxy Nexus (4.65 ", 720 x 1280:xhdpi):4.65-inch mobile phone with a resolution of 720 x 1280 with a screen pixel density of approximatel
is scaled according to the width of the parent view, and the distance from the top of the parent view remains the same.The other combinations are similar, and I don't list them here.Attention:1) When the Autoresizessubviews property of view is Yes (default is YES), autoresizing will not take effect.2) starting with XCODE6, Storyboardxib is automatically layout by default, so we need to adjust manually to use autoresizing.Action (Open the storyboard file, you will see the following image of the
1.ov7670 photosensitive Whole column 656*488 pixels, of which 640*480 is valid.2.ov7670 image Output format: VGA, which is a resolution of 640*480 output mode, QVGA, which is the output mode with 320*240 resolution, QQVGA, which is the output mode with a resolution of 160*120.The 3.PCLK is a pixel clock, and a pclk clock outputs one pixel. VSYNC, which is the frame synchronization signal. Href/hsync the sig
First of all these are said screen display resolutionVGA (Video Graphics Array) with a resolution of 480*640.QVGA (Quarter VGA) with a resolution of 240*320.HVGA (half) with a resolution of 320*480.In these three, of course, VGA is able to provide the highest image rendering capability.But today, the high-resolution, usually usedWVGA (Wide VGA) with a resolution of 480
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.