the standard Android phone screen, the so-called standard is the density of 160dpi, resolution of 320x480, density of 240dpi, The screen resolution is 480x800, of course, not including the tablet, this kind of tablet usually refers to the domestic
Screenshot capture without Root permission in Android
/*** The returned bitmap is the screen content */private static Bitmap takeScreenShot (Activity activity) {View view = activity. getWindow (). getDecorView (); // Enables or disables the drawing cacheview. setDrawingCacheEnabled (true); // will draw the view in a bitmapview. buildDrawingCache (); Bitmap bitma
of the size of the chalk and the corresponding relationship, for the development of Android games can take into account the future of 3.0 and a lot of tablet needs.Conventional we may only consider QVGA,HVGA,WVGA,FWVGA and DVGA, but left the phone to talk about, may use the tablet like WSVGA 1024x576 and WXGA 1280x768 and so on.QVGA = 320 * 240;WQVGA = 320 * 480
1. Overview
The Android fragmentation problem is a nightmare for every developer, and this article summarizes the Android adaptation issue in a comprehensive way.
First of all, look at the official report released by Google August 1, 2016:Relative numbers of devices related to the Android platform version:You can see that the 4.1 version and above a
Android Screen Toggle Summary (Android data)Android screen to solve the problem should be two:I. Layout issues Two. Reload the problem1. Layout problem: If you do not want the software to switch between the screen, the simplest wa
Ways to disable the Android screen and restart activity when switching screens1. Add the android:screenorientation= "Landscape" attribute to the Androidmanifest.xml activity configuration (Landscape is landscape, Portrait is portrait). Such as:
2. General screen switching, the activity to restart, in order to avoid restarting, you can add android:configchanges=
Widgets and Qt Quick apps
How does the android layout adapt to different screen sizes?
You can calculate the space occupied by your popupwindow in real time. For example, if your initial parameter is 300pxX250px, you 'd better instantly convert dp to px./*** Convert the dip or dp value to the px value to ensure that the size remains the same** @ Param dipValue* @ Param scale* (Density in DisplayMetric
the split-line footage in the drawable-nodpi, and the picture in the resource folder will be displayed in the actual pixel size, rather than being scaled by Android based on density. That is, the thin line in the MDPI is 2px (2DP), and the thin line in the xhdpi is 2px (1DP).The above is a preliminary summary of the Android screen, I do not know if you read afte
).The above is a preliminary summary of the Android screen, I do not know if you read after the enlightened, or confused? This article is mainly for practical purposes, avoid too much in-depth analysis, if you have any questions, you can leave a message.----------------------------------------------------------Finally, many friends asked me the design of the Android
1. Foreword
Now there are a lot of Android phones to support the screen unlock, tapping screen unlock is a very useful function, but a dozen support tapping screen, and then only for unlock or lock screen, and then our application layer developers can not go in, completely
, the requirements for API level are above 9, which means that the tablet or mobile phone of your Android system does not match Layout-xlarge at all. Because the API level is 8. Drawable-tvadpi requires more than 13 API levels.
In fact, the preceding Layout-large directory is actually a range. When the system determines the directory that the program should match based on the size and density of the current
Android screen adaptation has always been a headache for developers, because Android devices vary in size, and screen display is not the same, how to screen adaptation to Android is a big challenge, in order to deal with different
complies with the rule of ldpi: mdpi: hdpi: xhdpi: xxhdpi = 3: 4: 6: 8: 12.
If you make a 2x7 splitting material into a 9.png image, what if you want to make the thin lines 2px in different density instead of being scaled by Android? You can put the split line material in drawable-nodpi. The images in this resource folder will be displayed according to the actual pixel size, instead of being scaled by Android
and prohibit the use of absolute layout, because there are many problems with absolute layout.
Using qualifiers
Using Dimension Qualifiers
Res/layout/main.xml, single panel (default) layout.
Res/layout-large/main.xml, double panel layout.
Note the large qualifier in the second layout name directory. The system selects this layout on devices that are part of a larger screen, such as a 7-inch or larger tablet
documents: Beginning with Android 3.2 (API level 13), the above size groups are deprecated and you shoshould instead usesw
dp
Configuration qualifier to define the smallest available width required by your layout resources. For example, if your multi-pane tablet layout requires at least 600dp of screen width, you should place it inlayout-sw600dp/. That i
dpnormal screens are at least 470dp x 320 dpsmall screens are at least limit DP x 320dp here the width and high value are actually given and there is no separate comparison significance, the final result is the product of it. That is to say, the minimum screen must have 426*320 = 136,320 dp, and at least 470*320 = 150,400 dp to become a medium screen. The list is as follows: smal = 136,320 normal = 150,400
1 Screen-cutting interfaceIf you want the screen before Android5.0, you need to get the system root permission. But after Android5.0 Android opened the new interface android.media.projection, developers use this interface, third-party applications no longer need to obtain the system root privileges can also be directly screen
Background:
So far, Android has evolved from 1.5 to 3.2. When writing an application, we usually get the screen height, width, and Status Bar Height.
However, the android system has changed too fast. From the initial mobile phone operating system to the current 3.2 tablet computer system, there has also been a big chan
Reprint Please specify source: http://blog.csdn.net/my_truelove/article/details/66584865Visit ruicb.com, one click to reach my blog! Scan the left or the bottom right QR code, follow my public number, timely access to the latest article push!
Conceptual Literacy inchpx and DPI
1 inch of screen size
2 px of screen resolution
DPI of 3 pixel density
Fragmentation of di
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.