: 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 actual resolution of the device. This resolution is irrelevant to the resolution of the device. For example,
GDI windows form application uses the operating system control to establish its application. Therefore, it is basically difficult to customize them in your application. The WPF control is actually drawn on your screen. Therefore, if necessary, you can completely customize the control and modify its behavior.Features of WPF
WPF has many advantages. Let me introduce the following:Pixels unrelated to devices (DPI)
WPF introduces device-independent
To handle a wide range of resolutions and sizes.
For images, Android uses DPI as the unit. If you select an image, right-click the image under win and you will see the DPI attribute. The higher the DPI, the finer the image. For a mobile phone or display device, a pixel is a point, so DPI = PPI. In turn, it is often sai
Document directory
Terms and concepts
Http://developer.android.com/guide/practices/screens_support.htmlTerms and concepts
Screen size
Actual physical size, measured as the screen's diagonal.
For simplicity, Android groups all actual screen sizes into four generalized sizes: small, normal, large, and extra large.
Screen density
The quantity of pixels within a physical area of the screen; usually referred to as dpi (do
: pixels = dips * (density/160). For example, on a screen with a dpi of 240, 1 dips equals 1.5 physical pixels. We strongly recommend that you use dip to define the layout of your program's interface, as this will ensure that your UI will display properly on screens of all resolutions.To simplify the programmer's face in various resolutions, but also for the various resolutions of the platform can directly run these programs, the Android platform to a
Android phone app icon size specifications and naming specifications are as follows infographic.The Android Icon Specification infographic contains the Android launcher icon, the Android bottom menu icon, the Android Pop-up dialog top icon, the Androchang list internal list item icon, and the Android bottom or Top tab tag icon. Very complete.1. Android Program launch icon: ldpi (+ dpi)Small screen mdpi (DPI
The viewport (viewport), often said in the mobile front, is the screen area where the browser displays the content of the page. Several important concepts involved are the relationship between DPI (device-independent pixel device logic pixels) and CSS pixels.(1) Layout viewport (layouts viewport)The browser of the general mobile device defaults to a viewport meta tag, which defines a virtual layout viewport, which is used to solve the problem of earli
distance, coordinates, Chettu and so on (word level is allowed 0.5pt). Now Store audit even if do not do 1x size can also pass, but IOS engineers in the engraving interface is still 1x as the benchmark, coordinates or something or to use 1x when unit. So the UI in doing @2x big picture or obediently put all the numbers are set to even.
Android is more trouble, screen size and machine species are very many, it is not possible to have a version of each size PSD, usually signed will be included i
To draw this circle-shaded avatar, the individual breaks down into three layers
1, first draw the edge of the avatar gradient
Radialgradient gradient = new Radialgradient (j/2,k/2,j/2,new int[]{0xff5d5d5d,0xff5d5d5d,0x00ffffff},new float[]{0.f , 0.8f,1.0f}, Shader.TileMode.CLAMP);
Paint.setshader (gradient);
Canvas.drawcircle (J/2,k/2,j/2,paint);
2, cut out the round head bitmap
/** * Convert picture into round * @param bitmap incoming Bitmap Object * @return/Public bitmap To
pixel can only have one color (for simplicity, the sub pixel anti-aliasing technique is not discussed here), to be displayed on the screen, you must first convert the length in PT to the length in pixels, which is the media of the conversion, which is the DPI (in fact, The so-called DPI here is the term used in operating systems and browsers, which is PPI, pixels per inch, and the
Jorux has been resolved, only in the body selector in the 62.5% to 63% can be normal display. The reason may be that when IE deals with Chinese characters, the precision of floating-point values is limited. Don't know if there's any other explanation.
Description of Unit PT
In typography, point is an absolute value, which equals 1/72 inches and can be measured by a ruler, in physical inches. But the meaning of PT in CSS is not so. Because our display is split into pixels, a single pixel can o
horizontal direction is (nL + nH × 256 ).
. If the number of points exceeds one row, the part that exceeds the maximum number of points (related to the selected bitmap method, see the table below) is ignored.
. D is the bitmap Data byte. If the corresponding bit is 1, The point is printed. If the corresponding bit is 0, the point is not printed. (K indicates the number of data records)
. M is used to select the bitmap method.
M
Mode
Vertical
Horizontal
Points
Reso
different mobile phones, which may cause many problems, such:
1: images are displayed on different devices in different sizes.2: Layout is displayed on different devices and may be deformed.Some basic solutions:
1: Try to use sp as the unit for fonts, and try to use dp or dip for others.2: Use wrap_content, fill_parent, or dp to define the layout size.3: Optimal Proportion of image files corresponding to devices of different density.For devices with four density options: low-
by the camera.
640*480 = 307200 = 0.3 million pixels 1600*1200 = 1920000 pixels 2 million * 3264 = 2488 pixels 8120832*8 million = 4536 pixels 3024*13716864 = 14 million pixels
DPI and PPI
DPI (Dots Per Inch) is used in the printing industry to measure the density of spatial points. This value is the number of ink points that the printer can spray Per Inch. The computer display device draws on the
: pixels = dips * (density/160). For example, on a screen with a dpi of 240, 1 dips equals 1.5 physical pixels. We strongly recommend that you use dip to define the layout of your program's interface, as this will ensure that your UI will display properly on screens of all resolutions.To simplify the programmer's face in various resolutions, but also for the various resolutions of the platform can directly run these programs, the Android platform to a
What is DPI?DPI is the abbreviation for "dot per inch" and the number of pixels per inch.Four density classifications: ldpi (Low), MDPI (Medium), hdpi (High), and xhdpi (extra high)General screen: LDPI is 120,mdpi is 160,hdpi is 240,xhdpi is 320.The DPI calculation formuladpi= diagonal pixel values/dimensionsPhone screen resolution and screen density are differen
Basic terminology
Screen Size: The diagonal length of the actual phone's main screen, such as iphone 4.7 inch;
Resolution: With the computer monitor resolution, such as 1334x750 pixels;
Pixel density (DPI pixels per inch): Compresses the resolution to the screen size, such as the 1334/phone length, such as more than 326 pixels per inch, becomes "retina"
Dip: device independent pixels, is a logical density calculated value, wit
Px: The pixel of the screen.In: inchesMM: mmPT: LB, 1/72 inchDP: an abstract unit based on density. If a screen of DPI is displayed, 1dp = 1px.Dip: equivalent to DPSP: similar to DP, but it also scales according to the user's font size preference.We recommend that you use SP as the unit of text, and dip for others.
The following is an overview of the relationship between DIP and PX:
The following figure shows the resolution information density, which
I believe that every new Android beginner will encounter this problem. I hope this post will not make you tangle any more.Px:
That is, pixels. 1px indicates a physical pixel on the screen;
The unit of PX is not recommended because the actual size of a PX image may be different on different mobile phones, as shown in (the image is from the android developer guide, the same below ).
The occasional use of PX is that when you need to draw a 1 pixel table line or shadow line, other units such as DP
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.