See a lot of netizens do not understand the difference between DP, SP and PX: Now introduce the DP and SP. DP is also dip. This is basically similar to SP. You can use a DP or SP if you set properties that represent length, height, and so on. However, if you set the font, you need to use the SP. The DP is not density-independent, and the SP is not related to scale, except for density. If the screen density is 160, then the DP and SP and PX are the same. 1DP=1SP=1PX, but if you use PX as the unit
, PX, in, PT, mm) There are a lot of people who don't understand the difference between DP, SP, and PX: Now let's introduce the DP and SP. DP is also dip. This is basically similar to SP. You can use a DP or SP if you set properties that represent length, height, and so on. However, if you set the font, you need to use the SP. The DP is not density-independent, and the SP is not related to scale, except for density. If the screen density is 160, then the DP and SP and PX are the same. 1DP=1SP=1P
1. px (pixels) pixels-is a pixel, which is the actual pixel unit on the screen.
Dip or dp (device independent pixels) device independent pixels, related to the device screen.
Sp (scaled pixels-best for text size): similar to dp, it mainly deals with the font size.
Dpi (dot per inch): screen pixel density, how many pixels per inch
There is a member with the same name in the android api. The method is as follows:
2. dpi indicates the pixel density of the screen. That is, the number of pixels on t
(adjustFontSize + 4 );} Else {(TextView) v). setTextSize (adjustFontSize );}}}}// Obtain the font sizePublic static int adjustFontSize (int screenWidth, int screenHeight ){ScreenWidth = screenWidth> screenHeight? ScreenWidth: screenHeight;/*** 1. Obtain the view width in onsizechanged of the view. The default width is 320. Therefore, a scaling ratio is calculated.Rate = (float) w/320 w is the actual width2
Today, when collecting images from the Momo website, the resolution of the images will be changed to 320*480, and the original images contain pixel information.
For example, clear cottage (320*480) Wallpaper
So what should I do if I want to leave the "Clear cottage Wallpaper?
First, we should immediately think that we should first find the string and remove it.
Well, first of all, I thought so too. I define
This article mainly introduces the application details of meta tags in mobile platform development. For more information about meta tags, see, it will always be inside the head element. It must have special feelings for SEO friends for meta. Today we will talk about the meta tag of the mobile platform, what are the magical effects of meta tags on mobile platforms?
1. Meta viewport
Speaking of the meta tag of the mobile platform, you have to talk about the viewport. What is the viewport?Viewport
In "QT Quick Introduction" We mentioned that QML syntax is similar to JSON, please refer to "qt on android:http Download and JSON parsing" to see the JSON syntax. Of course, we expect to learn QML from scratch, so you can also look straight down.Copyright Foruok, reproduced Please specify the source:Http://blog.csdn.net/foruokObjectThe suffix of the QML file is QML, which is actually a text file. The following is a simple QML file:Import QtQuick 2.0import qtquick.controls 1.1import qtquick.dialo
For the desktop platform Web layout Everyone is familiar with meta tags, it is always located inside the head element, to do SEO friends must have a special affection for meta, today we say mobile platform META tag, on the mobile platform META tag What are the magical effects?1. Meta-ViewportWhen it comes to mobile platform meta tags, you have to say viewport, so what is viewport?Viewport is the viewable area, for desktop browsers, viewport refers to the area that is used to look at the page aft
ideal viewport. All iphone ideal viewport width is 320px, regardless of its screen width is 320 or 640, that is, in the iphone, the 320px in the CSS represents the width of the iphone screen. But the Android device is more complex, there are 320px, 360px, 384px, and so on, about the different devices ideal viewport the width of how much, you can go to http://viewportsizes.com to see, which collects the ideal width of many devices. To sum up: PPK the
I am not familiar with the meta tag in the web layout of the desktop platform. It will always be inside the head element. Do you have special feelings for SEO friends about meta, today we will talk about the meta tag of the mobile platform. What are the magical effects of the meta tag on the mobile platform?
1. Meta viewport
Speaking of the meta tag of the mobile platform, you have to talk about the viewport. What is the viewport?Viewport is the visible area. For a desktop browser, viewport is t
has been studying to now ... It's a magical question.I var a=0 then go ahead and write the code down,varA = 0;varb;$ (". Qhan ul Li.next"). Click (function() {(A); b=a* ( -320) + "px"; $(". BG ul"). Animate ({top:b},300);}); $(". Qhan ul Li.prev"). Click (function() {(A>0)? (a--):(a=2); b=a* ( -320) + "px"; $(". BG ul"). Animate ({top:b},300);}); $(". Qhan ul li"). Hover (function() {clearinterval (time),fu
ArticleDirectory
Object and embed labels
Use
Opensource's swfobject. Net Control
Commercial Flash Object Control
Aspnetflash webcontrol
Flash objects are often inserted in projects. Generally, a flashobject is stored in HTML.CodeYes:
Object Classid= "CLSID: D27CDB6E-AE6D-11cf-96B8-444553540000"
Codebase= "Http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8"
Width= "320" Height= "220"
ID= "T
One, add a new line0. Remove the last child controlUIView *last = [Self.view.subviews lastobject];New Y for this line = Last child control y + height of last child controlCGFloat rowy = last.frame.origin.y + lat.frame.size.height + 1; 1 for Line spacing1. Create a rowUIView *rowview = [[UIView alloc] Initwithframe:cgrectmake (0, Rowy, 320, 50)];* Equivalent to the following two linesUIView *rowview = [[UIView alloc] init];Rowview.frame = CGRectMake (0
Decompile a program and see a synthetic graph. I want to split each small graph and find the coordinates of each graph. Then I wrote a small method to help you.
package com.bitimage;import java.io.ByteArrayInputStream;import java.io.ByteArrayOutputStream;import java.io.File;import java.io.FileOutputStream;import java.io.IOException;import java.io.InputStream;import android.app.Activity;import android.graphics.Bitmap;import android.graphics.Bitmap.CompressFormat;import android.graphics.drawable.B
Difference between DP, SP, and PX: here we will introduce DP and sp. DP is dip. This is basically similar to sp. You can use DP to specify the length, height, and other attributes.Or sp. If you set the font, you need to use sp. DP is not related to density. SP is not only related to density, but also to scale. If the screen density is 160, DP and SP are the same as PX. 1dp = 1sp = 1px, but if PX is used as the unit, if the screen size remains unchanged (assuming it is still 3.2), the screen dens
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.