No specific details appear in android studio when configuring application for various screen sizes

Asked

Viewed 477 times

0

Please ask that in reply do not indicate me the link of the documentation of android to read. I am developing an application that has that be adapted to more or less 8 different inch screen formats, at least 4.5 inches and at most 7 inches in the minimum 15 API. Looking at several tutorials on the internet has been taught that to adapt the layouts.xml to different screens have to create and name the folders with the following names for the different sizes:layout-small(0dp-470dp), layout-normal(472dp-640dp), layout-large(641dp-960dp/mdpi 1024x600 - tvdpi 800x1180, xhdpi 1200x1120) and layout-xlarge(961dp) being that for folder layout-normal the android rule is of screens from 3.7 to 4.3 inches and folder layout-large 4.0 to 7.1 inches. In my project I am organizing initially 4 layouts xmls in normal, large, normal tvdpi and normal xhdpi folders and the chosen Devices are Nexus s 4.0", Nexus wxga 4.7", pixel Xl 5.5" and nexus6 5.96". The problem I’m having is that in the menu to choose the device of xmls layouts does not appear the respective devices in almost any folder, and even when I add a device setting this setting is not set to the specific layout. And when I select a device and click on another layout and go back to the layout I was on the device I’ve set up is no longer in layout.xml. For anyone who has experience with applications adapted to various screen sizes please ask for tips on how I can set up the layouts to be modeled on the Nexus s s 4.0", Nexus wxga 4.7", pixel Xl 5.5" and nexus6 5.96" and how I make it appear all the Vices in the Vices menu. Below are some images to help.

Diferentes tamanhos de layouts.xmls

Highlight the different sizes of layouts.xmls

inserir a descrição da imagem aqui

Note that for the folder selected in the left corner Activity xml register contractor(large) in the menu of Vices in the red box highlighted is not available almost any device.

inserir a descrição da imagem aqui

Note that for the folder selected in the left corner Activity xml register contractor(normal), in the menu of Vices in the highlighted red box is only available at the end of the menu the Avd Nexus 5.

1 answer

0

When you create a layout, usually this layout is automatically docked to all screen sizes, for example, if you create a Linearlayout and put size attributes like match_parent or wrap_content, they will adapt to the size of the screen and other objects you insert on the screen... Then it would be favorable for you to create a layout in which to take this information into consideration, without worrying about sizes. Cases can happen when we talk about putting images in layout, because precisely the image can be distorted among other things, but then we need to do a validation for image to solve these problems.

Obs: I don’t know if what I said was what you want, but that’s what you thought

  • In this my multi-screen project will not solve my responsiveness problem just by configuring the elements by switching to match_parent or wrap_content. I’ll have to manually rearrange the elements of each different.xmls layouts so the layouts don’t get messy. As for example, in a screen of 4", for being a very small screen, the layout elements are very expressed if you configure the elements only by wrap_content and match_parent. The problem is that no specific labels are available for the folders highlighted in the image.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.