There are a lot of SP and DP online in AndroidArticleI have talked about it all, but there is always a feeling that I am not doing anything. Now, let's talk about DP and sp. Let's talk about it. If you are not interested, please click it.
1. DP (or dipDevice Independent pixels)
An abstract unit based on screen density. 1dp = 1px on a display at 160 o'clock per inch.Different devices have different displ
Website: http://blog.csdn.net/zhou1232006/article/details/6149548An in-depth understanding of the three registers of arm is of great benefit to both programming and porting of the operating system.1. Stack pointer R13 (SP): Each anomaly pattern has its own independent R13, which usually points to the stack dedicated to the exception mode, i.e. five exception modes, non-exception modes (user mode and system mode), each with separate stacks, indexed by
are shorter than the phone screen, some are longer than the screen, on the tablet and mobile phone compared 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
Difference between dip, dp, sp, pt and px in Android, androiddip
1. Overview
In the past, programmers often designed computer user interfaces in pixels. For example, the image size is 80x32 pixels. The problem with this processing is that if you run the program on a new display with a dot (dpi) higher per inch, the user interface will look small. In some cases, the user interface may be small to difficult to see the content. Therefore, we can solve th
Reference:1. Change the sharedpreferences storage path using the Java reflection mechanism Singleton19002. Android Rapid Development series 10 commonly used tools class HongyangImportandroid.app.Activity;ImportAndroid.content.Context;ImportAndroid.content.ContextWrapper;Importandroid.content.SharedPreferences;ImportJava.io.File;ImportJava.lang.reflect.Field;Importjava.lang.reflect.InvocationTargetException;ImportJava.lang.reflect.Method;ImportJava.util.Map; Public classSputil {/**the path of the
In Android development, when it comes to screen video problems, the conversion between PX, DP, SP is an important part, so Yang Brother a tool class for everyone.Package com.zw.express.tool;Import Android.content.Context;Import Android.util.DisplayMetrics;/*** YDC* @author Administrator**/public class Densityutils {/*** Switch from Dip unit to PX (pixel) According to the resolution of the phone*/public static int dp2px (context context, float Dpvalue)
AutoscreenadaptationAndroid screen adaptation items directly with the DP and SP can be added without modification directly into a code to achieve the adaptationNot sure if there will be compatibility issues and performance issues that require time testingAt present, the different resolutions of the simulator are tested and the basic effect of different DPI is not much worse.Rotating the screen layout scales the view by the size of the horizontal versi
An in-depth understanding of SP, LR, and PC in-depth understanding of the three registers of arm is of great benefit to both programming and porting of the operating system.
1. Stack pointer R13 (SP): Each anomaly pattern has its own independent R13, which usually points to the stack dedicated to the exception mode, i.e. five exception modes, non-exception modes (user mode and system mode), each with separa
From the start of the Android program, I was told that the common sense
1. Length width of the value to use the DP as a unit into the Dimens.xml file
2. The value of the font size to use the SP as a unit, also into the Dimens.xml file
Then, there is no then, as if the subtext is that, you remember to use on the line.
One day, when we accidentally put the font into a DP, it can work, and the effect of the same as the
above parameter is that the dip is equal to the PX value.From the above, the visual designer in the WVGA (480x800) mode design, the recommended optimal spacing is: 12px, 18px, 24px, 30px, 36px, 42px, 48px, because the dip, PX value in the HVGA\WVGA corresponding are even, Each element can be the most stringent alignment.Second, SP and pxVisual measurement results between SP and px under WVGA (800x480):
DP (DIP): device independent pixels (unit independent pixels). Different devices have different display effects, this is related to the device hardware, generally we support WVGA, HVGA and QVGA recommend this, do not rely on pixels.Px:pixels (pixels). Different devices show the same effect, generally we hvga represent 320x480 pixels, this use more.Pt:point, is a standard length unit, 1pt=1/72 inches, for the printing industry, very simple to use;sp:scaled pixels (enlarge pixels). Mainly used for
Debugging when developing a website with vs2008
Code (Select the method attached to the process for debugging), the following error is reported when executing an SQL query:
"/Vm" Application
Program Server error.
The execute permission on the object 'SP _ sdidebug' (Database 'master', owner 'dbo') is denied.
Note:An error occurred while executing the current Web request. Check the stack trace information for details about the error an
Dp (dip): device independent pixels (device independent pixel ). different devices have different display effects, which are related to the hardware of the device. We recommend that you use this function to support WVGA, HVGA, and QVGA without pixels.
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;
Yang is SS/SN is SP (medium)
--- Integrate the concept of social software into SP operation
Step 1: add your own mature IM/Outlook contact list:
By default, SMS chat is only performed for SP operations.Step 2: Apply for adding the SN yourself:
Enter the following information segments:
2. Engaged in industry
2. Educational Level
2. Location
2. Self-Introdu
DP (DIP): device independent pixels (unit independent pixels). Different devices have different display effects, this is related to the device hardware, generally we support WVGA, HVGA and QVGA recommend this, do not rely on pixels.Px:pixels (pixels). Different devices show the same effect, generally we hvga represent 320x480 pixels, this use more.Pt:point, is a standard length unit, 1pt=1/72 inches, for the printing industry, very simple to use;sp:scaled pixels (enlarge pixels). Mainly used for
2 + width pixel number 2)/Screen diagonal inchesDp:density-independent pixels, with 160PPI screen as standard, then 1dp=1px,Conversion formulas for DP and PX:dp*ppi/160 = px. such as 1DP x 320ppi/160 = 2px.Sp:scale-independent pixels, which is the font unit for Android, is the standard 160PPI screen, when the font size is 100%, 1sp=1px.conversion formula for SP and px : sp*ppi/160 = pxIt concludes that:PX
[Dip:device independent pixels (device independent pixel).
Different devices have different display effects, this is related to the device hardware, we generally support the WVGA, HVGA and QVGA recommended to use this, do not rely on pixels.
Px:pixels (Pixel). Different devices display the same effect, generally we hvga represent 320x480 pixels, this use more.
Pt:point, is a standard length unit, 1pt=1/72 inches, used in the printing industry, is very simple and easy to use;
sp:scaled pixels
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.