Mobile terminal adapter - Principle articles

Mobile terminal adapter, is that we often encounter in development, there may be encountered a lot of problems:

  • 1px problem
  • UI Figure perfect adaptation scheme
  • iPhoneX adaptation scheme
  • Horizontal screen adaptation
  • HD screenshots ambiguity
  • ...

These problems may have been above we know how to solve in development, but the principle of the problems, as well as the principles of the solution may be blurred. In the process of solving these problems, we often encounter a lot of concepts: pixel resolution, PPI, DPI, DP, DIP, DPR, viewports, and so on.

Based on the concept paper will end mobile adaptation of departure to explore the mobile terminal adapted to various problems and solutions implementation principle.

First, inch

Inch screen with a general description of physical size, such as computer monitors 17,22, 4.8,5.7 and other units of the mobile phone displays are inches.

Inches and centimeters conversion: 1 inch = 2.54 cm

Second, the physical pixels

2.1 pixels

I.e., a small block of pixels having a specific color and position.

Pictures, electronic screens (mobile phones, computers) is the mosaic composed of numerous small squares with a specific color and a specific location.

Pixel screen can be used as electronic images or the minimum constituent units.

2.2 physical pixels

Electricity supplier website to buy mobile phones, mobile phones will look at parameters to apple's official website to describe the resolution of the mobile phone as an example:

iPhone XS Max iPhone SE and the resolutions are 2688 x 1242 and 1136 x 640. It represents the phone number of pixels respectively in the vertical and horizontal possessed. Described herein is the actual physical pixel screen, i.e. a screen by a specific number of pixel dots.

Screen from the factory that day, physical pixels on top of it fixed, and the unit is pt. Of course, high-resolution screen does not mean that it is clear, and the clarity of the screen is also related to the size.

Device pixel pixel = Physical

2.3 PPI (Pixel Per Inch) - included in the number of pixels per inch

PPI can be used to describe the clarity and quality of the screen a picture of.

When using the PPI to describe the image, the higher the PPI, the higher the picture quality, the use of PPI description screen, the higher the PPI, the sharper screen.

Since the mobile phone handset size lengths of diagonal lines, as commonly used method of calculating PPI:

iPhone PPI is 6
, and that it contains about 326 physical pixels per inch.

Guess you like

Origin www.cnblogs.com/sunidol/p/11517732.html