To address Android's challenges with screen sizes and resolution, the operating system uses an idea called the density-independent pixel, variously abbreviated dp or dip. Android's approach to screen resolution can be baffling, and Android comes with a variety of layout tools. Once you master them, "it's zero-effort-easy to make layouts that automatically resize for portrait/landscape device orientations and varying screen sizes," said Meridian Apps programmer Nick Farina in a blog post. "If you specify, in your application, a button with a width of 100 pixels, it will look at lot smaller on the 640x480 device than on the 320x480 device. Now, if you specify the width of the button to be 100 dip [density-independent pixels], the button will appear to have exactly the same size on the two devices," said Android engineer Romain Guy in a mailing list post.
The Android approach could theoretically handle any pixel-per-inch density, But for convenience, Google set up what Hackborn called "a few major buckets..ldpi (approx 120dpi), mdpi (160 dpi), hdpi (240 dpi), and xhdpi (320 dpi)." To handle the approach, Google exhorts programmers, "Provide resources for different screen densities (DPI) to ensure that protective case for apple iphone x and xs - blossom pink/gold with gems your app looks great on any device.", So there's upfront work for coders and graphic designers, But the result, she said, is that software adapted reasonably well to the arrival of the Galaxy Nexus and its 316dpi, 1280x720 screen..
"Android and its applications were able to pretty much run on it as-is," Hackborn said. So yes, the Android approach is flexible. It had to be, of course: from the start, Google envisioned Android as an operating system for many manufacturers. Things work very differently in the world of the iPhone, where Apple is in firm control. With iOS, programmers pay more attention to each pixel. When the iPhone 4 arrived, the screen resolution doubled exactly from 480x320 to 960x640, making the pixel-doubling math easy. Many signs point to the next-generation iPad taking the same approach, doubling the first iPads' 1024x768 resolution to 2,048x1,536 pixels.
Apple's approach surprised Tim Bray, an Android developer evangelist for Google, when he realized how it worked from Farina's explanation, "I initially shook my head in disbelief at all the little bits of hard-coded arithmetic, like y += 7 and MARGIN - 30, Clearly this logic is not resilient in the face of a different-shaped screen, But I bet it's fast," Bray said, He added, It's protective case for apple iphone x and xs - blossom pink/gold with gems plausible, as Nick Farina implies, that iOS' fixed-dimensions screen model is partly responsible for the astonishingly-fast performance Apple wrings out of the underlying hardware..
And I'm not even saying that Apple's choice here is wrong. The trade-off, if I understand it correctly, is form-factor flexibility for performance and simplicity, and so far that's been working out pretty well for them. Programmers using Google's mobile operating system must reckon with upfront work for the wide range of Android screens, but the benefit is flexibility. One of the pesky fragmentation issues Android programmers must worry about is different screen sizes. With resolution changing from one phone to another, programmers have to figure out exactly how much room they can devote to icons, photos, video game backgrounds, dialog boxes. But, Google argues, paying the price upfront pays programmers back in the long run--and helps them avoid the fixed-resolution difficulties that afflicted Palm.
Copyright © 2019 www.pestitaly.it. All Rights Reserved