WebApp development in the early days, will encounter the PC-side development of the page in the mobile display too big problem, here need to add META tags in the HTML head to control the zoomHere are specific instructions for this tag:Viewport Syntax Introduction:The content contains several properties:height = [Pixel_value | Device-height] ,width = [Pixel_value | device-width],Initial-scale = Float_value,Minimum-scale = Float_value,Maximum-scale = Float_value,user-scalable = [yes | no],target-d
The dimensions and sizes must be distinguished by the following units: dp, sp, pt, px, mm, in
Px: pixel, in the unit of pixel size. In the android UI, this unit is the same as the actual physical screen resolution, and is mainly used to display the definition effect.
Dp: Density-independent Pixels (device independent pixel), short for "dp", that is, dip. It is an abstract unit, because the physical screen is large and small, however, dp displays the same size on different physical screens, t
How do I adapt to the various screen sizes of Android smartphones using Qt-developed Android apps?When it comes to screen sizes, from 2.8-inch to 8.9-inch phone screens, it's a little more painful for program apes. The Android project itself has considered this issue, resource files, ldpi/mdpi/hdpi/xhdpi, and so on, the Android framework automatically selects the appropriate icon based on the screen size, so that the application looks the same on different screen sizes.What about the Qt applicat
Camera pictures, pictures on the computer, text in Word, computer screen, mobile screen, camera screen display size Everything's all figured out!First, the picture.xxdpi= points DotX is the actual size of the picture, simple point, we only calculate the height of the picture, for example, took a picture 144x144 72dpi, then its actual height is 144÷72=2 inchesDPI is the dots per inch, after the camera has taken a picture of its DPI is determined (right
. The height is calculated based on the aspect ratio of the device screen. (In fact, the height of the viewport is almost useless and can be ignored)
In this way, the width and height of the viewport provided for CSS computing are similar to those of the desktop browser, and the rendering Effect of page computing is almost the same as that of the desktop browser. Page zoom-in does not affect layout viewport, that is, does not affect page rendering.
In a mobile browser, when all pages are
undoubtedly possible, but it is not universal... The following is an example:
Let's first implement the process of setting the height of the ImageView to make the image display a normal proportion in this specific simulator:
The actual pixel size of the above image is: 828*314, the ratio of width to height is about 2.43, and the size of the simulator we use here is 480*800 (unit: px, that is, pixels), that is to say, the width of the pixel is 480, so we need to set the height of this ImageVie
In the past two days, I used swing to write and print data. I found that the JDK document contains a description in units of 1/72 inch. It is troublesome to convert the paper size and screen size. What is 1/72 inch. I found the following information and finally found the conversion formula. Let's record it here :)
72 pixels/inch = 28.346 pixels/centimeter
300 pixels/inch = 118.11 pixels/centimeter
1 CM = 0.3937 inch
1 inch = 2.54 cm
Later I found another article, which is fully written.
Article:
WebApp development in the early days, will encounter the PC-side development of the page in the mobile display too big problem, here need to add META tags in the HTML head to control the zoomHere are specific instructions for this tag:Viewport Syntax Introduction:The content contains several properties:height = [Pixel_value | Device-height] ,width = [Pixel_value | device-width],Initial-scale = Float_value,Minimum-scale = Float_value,Maximum-scale = Float_value,user-scalable = [yes | no],target-d
= [Dpi_value | device-dpi | high-dpi | medium-dpi | low-dpi]
11
"
12
/>
WidthControls the size of the viewport, you can specify a value or a special value, such as device-width as the width of the device (in pixels of the CSS when scaled to 1
In this case, we will briefly animate the motion Picture (animation). Just like the cartoon principle, the essence of animation is to use the visual persistence of the human eye, quickly transform the picture, resulting in the illusion of the object in motion. For the Three.js program, the implementation of the animation is also achieved by redrawing the screen several times per second.To measure the screen switching speed, the concept of fps (Frames
There are many optimizations for the project, such as mesh merging, reducing drawcall and model bones and physical calculations, merging material balls, optimizing code, etc.
Previous post "finishing" Unity 3d optimization Summary
Now continue to fill in, the content for my experience and online collection and collation, I hope we have a better way to optimize, can continue to thread, together to explore, common progress.
Optimization:
1. Update the opacity map compression format for etc 4bi
There are many optimizations for the project, such as mesh merging, reducing drawcall and model bones and physical calculations, merging material balls, optimizing code, etc.Now continue to fill in, the content for my experience and online collection and collation, I hope we have a better way to optimize, can continue to thread, together to explore, common progress.Optimization:1. Update the opacity map compression format for etc 4bit, because the Android market in the mobile phone GPU has a var
the mobile phone GPU has a variety ofEach GPU supports different compression formats, but they are compatible with the ETC format,2. For transparent mapping, we can only select Rgba 16bit or Rgba 32bit.3. Reduced FPS, in projectsetting-> qualityVSync the Count parameter will affect your fps,everyvblank equivalent to Fps=60,everysecondvblank = 30;Both of these si
With the prevalence of high-end mobile phones (andriod,iphone,ipod,winphone, etc.), the development of mobile Internet applications is becoming more and more important, and it is the best choice to develop mobile applications with HTML5. However, each phone has a different resolution, different screen size, how to make our development of the application or page size can be suitable for a variety of high-end mobile phone use it? Learning the use of HTML5 viewport can help you do this ...Viewport
First, let us know an unfortunate message: pixels cannot be directly converted into inches or centimeters, and must be converted under DPI!
Two types of resolution conversion in Photoshop72 pixels/inch = 28.346 pixels/centimeter300 pixels/inch = 118.11 pixels/centimeter1 CM = 0.3937 inch1 inch = 2.54 cmCompare with common 1024 pixels:
1024 pixels = 3.413 inch = 8.67 cm (300 pixels/inch DPI ≈ 0.003333 in
With the prevalence of high-end mobile phones (andriod,iphone,ipod,winphone, etc.), the development of mobile Internet applications is becoming more and more important, and it is the best choice to develop mobile applications with HTML5. However, each phone has a different resolution, different screen size, how to make our development of the application or page size can be suitable for a variety of high-end mobile phone use it? Learning the use of HTML5 viewport can help you do this ... viewport
-scalable = [yes | no],
10
target-densitydpi = [Dpi_value | device-dpi | high-dpi | medium-dpi | low-dpi]
11
"
12
/>
1.Set widthControls the size of the viewport, you can specify a value or a special value, suc
Android resolution adaptation
The problem of Android resolution adaptation has always been a major problem for Android. Here, I refer to the official development documentation and some of the resolution processing skills in actual development to share with you.
Official resolution adaptation documentation "SupportingMultiple Screens"Overview of Screens SupportScreen size: Screen size Screen density: Screen Density Orientation: Direction Resolution: Resolution density-independent pixel (dp or dip
With the prevalence of high-end mobile phones (andriod,iphone,ipod,winphone, etc.), the development of mobile Internet applications is becoming more and more important, and it is the best choice to develop mobile applications with HTML5. However, each phone has a different resolution, different screen size, how to make our development of the application or page size can be suitable for a variety of high-end mobile phone use it? Learning the use of HTML5 viewport can help you do this ... viewport
-scalable=no" />Android 4.0 ~ 4.3As a relatively old version of Android, it has a poor support for the width attribute in meta. In Samsung Note II, for example, its device-width is 360px. If you set the width (hereinafter abbreviated) in viewport vWidth to a value that is less than or equal to 360, it will not have any effect, and a vWidth value greater than 360 will not cause the screen to scale, but a horizontal scroll bar appears.If you want to support Android 4.0 to 4.3, you still have to re
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.