0

So basically I have finished creating different layout sizes and put them in their respective folders(i.e layout-large, layout-xlarge, etc). Now I am struggling with getting the device to use the correct layout, because when I run the app on my phone(Oneplus One, 5.5") it doesn't use the layout resource file from "layout-large", but instead the file just named "layout". I thought this may have something to do with how in the Java code setContentView says R.layout.activity_main Not sure how to fix this. What do I do so the device uses the proper layout resource file?

2 Answers2

0

u need to copy all layouts in layout-large-mdpi folder. and resize ur images to fit in that screen and create drawable-large-mdpi (res/drawable-large-mdpi) and add images and u also need to create values-large-mdpi and add your dimen file with dimensions..

and check out these links hope help you

Different resolution support android

Application Skeleton to support multiple screen

Is there a list of screen resolutions for all Android based phones and tablets?

Community
  • 1
  • 1
M S Gadag
  • 2,057
  • 1
  • 12
  • 15
  • Actually there are no images. The problem I have is the device isn't using the layout from the folder it should be using. It's just using the main layout, but thanks anyway – Sudhanvi Koneti Nov 11 '14 at 05:15
  • k. just paste you xml layouts in **layout-large-mdpi** folder..if you are using hard code dimensions like height=50dp etc use dimen file. – M S Gadag Nov 11 '14 at 05:20
0

Your OnePlus One is not large screen size. It's Normal Screen size with XXDPI and resolution in dp is 640x360dp

So, your resouce folder must be layout-normal not layout-large

Ps. All android phone with 5+ inch still have Normal Screen size. I found only Samsung Galaxy Mega 6.3 which 6+" screen size that be Large screen size. (I'm not sure about Nexus 6 until I get a data from it)

Akexorcist
  • 2,287
  • 1
  • 16
  • 19
  • Oh ok I didn't realize this, because when I created the layout-large it displayed the preview in a 5.1 screen. I will try this. – Sudhanvi Koneti Nov 11 '14 at 15:17
  • Actually I remember going on the Android dev site, and was wondering why they have a picture where it says 5.5 inches come under large... Is that picture incorrect? – Sudhanvi Koneti Nov 11 '14 at 16:39