To solve Android device fragmentation, describe the concept of density, that is, density. it refers to the number of pixels displayed on a physical screen of a certain size. dpi (dots per inch, number of pixels per inch) is generally used as a single
Bit. for example, if the resolution of a device is 240x320 and the physical size of the screen is 1.5 inch x 2 inch (the diagonal line is 2.5), the density of the device can be expressed as 240/1. 5 or 320
If you want to adapt to the same application on different phone models, if you do not use px for all dp in xml, there is still a possibility of adaptation problems!There are countless mistakes and I think I am using dp. Why does the proportion on mobile phone A look different from that on mobile phone B, why is it displayed on mobile phone A while on mobile phone B on the screen?Every explanation is very tiring, so I wrote this blog
First, clarify several conceptsThe density value indicates the
After querying to the system service being executed, you can then add the service name to the Dumpsys and view the specified service information.ADB shell Dumpsys ActivityADB Shell Dumpsys Cpuinfoadb shell Dumpsys Batteryadb Shell Dumpsys window (the last part can see the resolution information) =====-------------------------------------------------Android developers about DP documentation I've seen n times, the conversion formula for PX and DP I remember very well: px = DP * (dpi/160) , the ori
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 mobile device viewport
, 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 mobile device viewport into layout viewport , visual viewpo
Notification Method:/** * Call when the keyboard changes frame (position and size)*/- (void)Keyboardwillchangeframe:(Nsnotification *) note{//set the color of the windowSelf.view.window.backgroundColor =Self.tableView.backgroundColor; //0. Time to remove keyboard animationsCGFloat Duration =[Note.userinfo[uikeyboardanimationdurationuserinfokey] doublevalue]; //1. Get the last frame of the keyboardCGRect Keyboardframe =[Note.userinfo[uikeyboardframeenduserinfokey] cgrectvalue]; //2. Calculate the
. 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 mobile device vie
size, different devices have different 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 widt
as Apple continues to launch new models, it is well known that UI layouts in iOS development often need to be adapted, and that the adaptation of Apple devices is primarily the 4,5,6,6plus of the 4 devices. The adaptation method has code adaptation and the use of xib to add constraints, where the code adaptation is used to AutoLayout but the official launch of the document and demo is really cumbersome, personally think it is not as stupid as a way to use the aspect ratio of the reality (but the
text, not because in a high-density pixel screen is too small to see, Ideally, this 14px of text, regardless of the density of the screen, at what resolution, the size of the display is similar. Of course, not just text, other elements like pictures and so is the truth. PPK called this viewport the ideal viewport, the ideal viewport--for a third viewport mobile device.Ideal viewport does not have a fixed size, different devices have different ideal viewport. All iphone ideal viewport width is 3
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 mobile device viewport
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 mobile device viewport
) {}});
Builder.show ();
Break
Default:break;
return dialog;
}
3. Standard adapter format, later written in this form
public class Myadapter extends baseadapter{context;
Pagerecord
4. Two ways to get screen resolution
Method 1 Android Gets screen width and height
windowmanager windowmanager = Getwindowmanager ();
Display display = Windowmanager.getdefaultdisplay ();
int screenwidth = Display.getwidth ();
int screenheight = Display.getheight ();
Method 2
displ
Found a little yellow button click on it
Then click on the Yellow triangle
There are a number of options that are typically selected when update frames updates the control's frame
The button means that for all controls to perform this method modification there is currently only one button that does not have to be selected
Select button on the interface after clicking
We can see that the length of the button is screen length and height because there is no constraint so it is adapted to the f
how to achieve can look at my previous article (audio transmission of the jitter buffer design and implementation).
Here's how to calculate the network delay statistics (OPTBUFLEVEL), which is one of the difficulties. Assuming 20Ms per pack, ideally every 20Ms receives a voice packet from the Web. The reality is that the network has delayed packet jitter, resulting in not receiving a packet every 20Ms, but sometimes dozens of or even 100 milliseconds to receive a package, sometimes 20Ms rece
The recent project, for the iphone model adaptation is very headache, so tidy up the online data, recorded, may be able to help you read the article,
I'm going to talk to you today about the full model fit idea of the latest research.
Currently, we need to adapt to the iphone models are 4s, 5s, 6s, 6Plus four kinds of models. Their size is
iphone4s {320, 480} 960*640Iphone5 5s {320, 568} 1136*640Iphone6
page storage management, to understand the technical characteristics of the virtual storage technology, and to master the page replacement algorithm of the request page storage management.
2. Experimental content
(1) Generate a sequence of instructions by random number, a total of 320 instructions. The address of the directive is generated according to the following principles:
The ①50% instructions are executed sequentially;
The ②50% instruction is
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.