/*** DP, SP conversion to PX tool class** @author Fxsky 2012.11.12**/public class Displayutil {/*** Convert PX value to dip or DP value to ensure size unchanged** @param pxvalue* @param scale* (attribute density in Displaymetrics Class)* @return*/public static int Px2dip (context context, float Pxvalue) {Final float scale = context.getresources (). Getdisplaymetrics (). density;return (int) (Pxvalue/scale + 0.5f);}/*** Convert dip or DP values to PX v
Dip: Device Independent pixels (device independent pixels). Different devices have different display effects. This is related to the device hardware. Generally, to support WVGA, hvga, and qvgaWe recommend that you use this,Pixel independent.Px: pixels (pixels). Different devices have the same display effect. Generally, we use hvga to represent 320x480 pixels, which is usually used.PT: point, a standard unit of length, 1pt = 1/72 inch, used in the printing industry, very easy to use;
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 size and screen resolution, so I spent some time learning about it and make a summary. If something is wrong, I still hope to correct it.
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
different mobile phones, you will find that the horizontal line on some mobile phones is shorter than the mobile phone screen, and some are longer than the screen, the differences between tablets and mobile phones are more obvious.Dip:
It is exactly the same as DP, but the name is different. Dip was used in earlier Android versions. We recommend that you use the DP name for consistency with sp.SP:
Scale-independent pixel ). SP is similar to DP, but t
Px, dp, and sp used in android DevelopmentFirst, we will introduce these units:
Px: pixels (pixels), which corresponds to the actual pixels on the screen.
Dip: device independent pixels, which is a density-independent pixel. It is an abstract unit based on screen density. On a display at 160 o'clock per inch,
1dp = 1px, that is, the 1: 1 relationship. (Dp is dip)Sp: scaled pixels (enlarged pixels). pixels i
Dpi, ppi, dip, dp, px, sp, dpippi
Basic Concepts
1. dpi (dots per inch): The number of dots per inch; ppi (Pixel per inch): The number of dots per inch. Designed for the monitor, dpi = ppi.
2. dip (device independent pixels) devices are independent pixels. Different devices have different display effects, which are related to device hardware and do not depend on pixels.
3. dp (Density-independent pixel), an abstract unit based on screen Density. 1
Why do I run it after setting SP to 4096? Is it from 4096 and then 4095 or 4097? 4096 is steppingstone's address?Why is the interruption set to 3072?
S3C2410 and S3C2440 have internal RAM and external SDRAM, which are called memory;The SP is located in the memory, which can be internal RAM or SDRAM, as long as the current runningProgramYou can.
At startup, first execute the internal RAM 4096, and then
1. SP split screen: Display On/Off split screen1. Open a file with vi2. Run the SP command to operate another file to be opened.3. display the up/down split screen after opening the fileIi. SP split-screen display: two files are displayed up and down1. input the following command: VSP d2041_i2c.c.2. Effect of the left/right dashboard of the VSPThis is a frequentl
first introduce these units:px : pixels (pixels), the actual pixel point on the corresponding screen.Dip :d evice independent pixels, density independent pixels, based on the abstract unit of screen density.On a monitor that is 160 dots per inch.1DP = 1px, which is 1:1 relationship. (DP is DIP) sp : scaled pixels (enlarge pixels). Pixels independent of density and font scaling. Mainly used for font display of best for textsize.Because the Android devi
Download Https://github.com/soybean217/demo-forwardingIntroduction IntroductionA demo for store and forwarding HTTP data. Base SP or MM fee or user register interface.A sample that stores and forwards HTTP data interfaces. Based on SP or mm billing or user registration data interface.Structure structureDemo-base, Public Function pack.Demo-interface,http Data receiving storage interface engineering. Interfac
agent is responsible for synchronizing the Copy command to the subscription server, which is still running.
4. In addition, there are also jobs that clear expired commands (REPL-clear distribution) and jobs that clear snapshots (REPL-clear snapshots ).
Bytes --------------------------------------------------------------------------------------------------------------------
(1) Too many transaction commands cause the log reader to read the transaction command timeout (or the server performance m
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/27/56/wKiom1Nx2b6wI8BpAALoUdZoJJQ877.jpg "title=" 5.13. JPG "alt=" wkiom1nx2b6wi8bpaaloudzojjq877.jpg "/>"What skills can I learn from this course?"Through this video you can learn all the configuration of the iOS XR system for the most important device of the Cisco SP CCIE Exam and help you pass SP CCIE certification successfully. This course cover
first introduce these units:px : pixels (pixels), corresponding to the actual pixel point on the screen.Dip :d evice independent pixels, density independent pixels, based on the abstract unit of screen density. On a 160-point-per-inch display,1DP = 1px, which is 1:1 relationship. (DP is DIP)sp : scaled pixels (enlarge pixels). Pixels independent of density and font scaling. Mainly used for font display of best for textsize.Because the Android device s
1.dp=dip2.PX is based on pixels, and the latter is based on pixel density.3.PX can be used for width height or font, DP for width, SP for fontThe 320*480 screen is the benchmark in 4.android. The same values of PX and DP, the same on the 320*480 screen, but different after changing the screen,The PX is also the same size as the 320*480, and the DP automatically fits the screen according to the scale5. Similarly, S
to the difference is more obvious.DipExactly the same as DP, except the name is different. The dip was used in earlier versions of Android, and the DP name was later recommended for unification with SP.Sp:Abstract pixels independent of scale (Scale-independent Pixel). The SP and DP are similar but the only difference is that the Android system allows users to customize text size (small, normal, large, oversized, and so on), 1sp=1dp=0.00625 inches whe
In file included from mod_shib_20.cpp:68:mod_shib.cpp:118:warning:deprecated conversion from string constant to ' char* 'Mod_shib.cpp:In member function ' Virtual const char* shibtargetapache::getscheme () const ':Mod_shib.cpp:385:error: ' Ap_http_method ' is not declared in this scopeMod_shib.cpp:In member function ' virtual std::string shibtargetapache::getremoteaddr () const ':Mod_shib.cpp:417:error: ' struct Conn_rec ' has no member named ' Remote_ip 'In file included from mod_shib_20.cpp:68
Project
Density
Scal
Use
DP (DIP)
Independent
You can use when setting properties that represent length, height, and so on
Sp
Independent
Independent
Set font
Px
Related
Project
Density
Scal
Use
WVGA
240
HVGA
160
QVGA
120
If the screen density is 160, then the
(233 px/inch)/(Px/inch) = 1.46 or soIncidentally, Android default only 3 Dpi,low, medium and High, corresponding to 120, 160, 240, if there is no special settings, all DPI will be counted as these 3, specifically refer to this postHttp://android.tgbus.com/Android/tutorial/201103/347176.shtmlThe default is 160.Sp:Abstract pixels independent of scale (Scale-independent Pixel).The SP and DP are similar but the only difference is that the Android system
pixels per inch. For example, 160 DPI indicates that the distance from each inch on the mobile phone is pixels in the horizontal or vertical direction. Assume that the device resolution is 320*240, the screen length is 2 inch-1.5 inch-320/2, DPI = 240/1 =. 5 = 160 note: this value corresponds to the value of the densitydpi attribute in the displaymetrics class
density (density)
indicates the number of pixels per square inch. density = resolution/screen s
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.