1, picture adaptation, different resolutions of the picture placed in the corresponding resolution of the Drawable folder, very few, generally only some of the more commonly used and "important" pictures will "cut a few sets of graphs"2, the other resources of the adaptation, compare font size, spacing, etc., you can define a different resolution of the "Values" folder, and then set different "demin" values
to the DPI of the corresponding screen.
3.3 Practice
About HD Design diagram dimensions
Google officially gives the HD design of the size of the two options, one is designed to MDPI, and then to zoom to get a higher resolution of the picture, the other is a high resolution as the design size, and then according to the multiple corresponding to the small resolution of the picture.
Based on experience, I recommend the second method, because the sma
, there are two types of attributes, one of which is the alignment of the child element in the parent element, and the other is the position of the child element relative to the other element.The following is the first class of propertiesFor the second class of properties, let's practice:Create a new Android project, and then locate the layout XML file in the Layouts folder and write to the following layoutThen find the String.xml in the Values folder and add the following codeThe results are as
Recently doing about iphone6,6+, and your adaptation to IOS8.Make a summary here.The implementation of the iOS multi-screen adaptation is designed in the following ways.1, macro definition:Principle: Get the width and height of the screen by defining the macro definition to dynamically position the size and position of
This article is the official HTML5 training course for h5edu institutions, mainly introduces: JavaScript intensive tutorial--cocosjs screen adaptation schemeFirst of all, humorous aside, for any large project, the coding specification is important, in cocos2dx-jsbinding this framework, JavaScript is an absolute core of the scripting language, 99% of the game logic is done by JS. Scripting is definitely larg
Android screen adaptation has always been a headache for developers. Because android devices have different sizes and different screen display effects, it is a great challenge to adapt android devices to the screen, in order to deal with different situations, we need to carefully study the definition of different scree
, respectively, a vertical screen and two horizontal screen layout files to adapt to the vertical screen screen automatically switch.C. provide different images for different densities of screens.Should try to use a point 9 format of the picture, if you want to the low density of the
, 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 screen. You can also individually customize
; setPosition (visibleSize. width/2,320); // equivalent to the preceding Bg->setScaleX(visibleSize.width / 960); // An genie is displayed in the upper-right corner. auto Spr = Sprite::create("test.png"); this->addChild(Spr); Spr->setPosition(visibleSize.width - 50, visibleSize.height - 50); // Because it is a fixed height, visibleSize. height is always 640, so the following statement is also acceptable. //Spr->setPosition(visibleSize.width - 50, 590); // For a portrait game:glview->setDesignRe
Preface
With the constant changes in mobile phone screens, some users' mobile phone screens are still in the size of 240*320. Of course, they are also stored in some irregular screen resolution. For many UIS, multiple sets of images can be drawn from different mobile phone screens to ensure that the mobile client matches on different screens. Plan the implementation of the mobile client on different screens, and develop a filling Area algorithm that
fit : The current app shows the same effect on the same phone. Before fitting, it is necessary to determine the pixel density type (such as: xhdpi, hdpi, MDPI, etc.) of the current phone, then calculate its pixel density, and give the layout position and size of the interface element at a certain proportion.On Android, screen video is mainly available in the following ways:
Picture adaptation
D
In mobile development, screen adaptation is an eternal topic, mainly due to the fragmentation of Android (IOS ......
There are a lot of posts on the Internet to explain the cocos2d-x 2.x screen adaptation of the post, very little about 3.2, today I refer to http://blog.csdn.net/liaowenfeng/article/details/8566856click
Android screen adaptation, Android
To sum up your screen adaptation experience, I only hope that I can continue to improve and improve. If you have a warm-hearted "predecessors" to guide me, I am very grateful!
Android 5.0 has already come out, saying that this version has done a lot of work on Android
is OK, I set up the vertical screen layout up and down button on the horizontal screen layout to establish a horizontal buttonLook at the effect of the operationWe can see that the system has helped us automatically switch the layout when the screen conversion, so that the basic adaptation of the
"android:layout_height= "Wrap_content"android:text= "@string/hello_world"/>Simulator (HDPI): Load dimens.xml resource file, located under res/value-800x480 folderAccording to the above hdpi DP and px conversion relationship 1DP = 1.5px, then 160DP = 240px, the current control width should be in the middle of the screen position.G700 (xhdpi): Load dimens.xml resource file, located under res/value-1280x720 folderAccording to the above xhdpi DP and px co
layout system-that is, the literal meaning, is responsible for the position of each element of the interface.
In summary, AutoLayout provides developers with a layout method that differs from the traditional placement of UI element locations. Previously, whether you were dragging or dropping in IB or writing in code, each uiview had its own frame property to define its position and size in the current view. With AutoLayout, it becomes the use of constraints to define the location and dimen
The previous article explained in detail how the Onmeasure/measure method works in Android custom controls, see blog: Android Custom Control Series seven: detailed in the Onmeasure () method, how to measure a control size (a), To really practice today, let these two methods show great divinity to help us deal with the picture screen adaptation problems.Please respect the original labor results, reproduced p
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.